getting rid of dead keys

Kernels & Hardware, configuring network, installing services

getting rid of dead keys

Postby morgon » 2020-11-05 20:30

Hi,

I run testing and have a german keyboard with "dead keys" used to input accented characters, a feature I don't need.

So I want to get rid of them.

One way that works is to run "setxkbmap de nodeadkeys" within X, but I always thought the proper way to do such a thing is via "dpkg-reconfigure keyboard-configuration".

So I ran that and selected a layout with no dead keys - but that did not change anything.

So my questions are: Why does ""dpkg-reconfigure keyboard-configuration" not work (am I doing something wrong?) and what would be the proper way to get rid of dead keys systemwide?

Please note: I do not run a DE (GOME or KDE may have dialogs for such things) but only run i3.

Many thanks!
morgon
 
Posts: 174
Joined: 2010-08-28 03:04

Re: getting rid of dead keys

Postby reinob » 2020-11-05 20:42

From what I can tell you configure /etc/default/keyboard.
In my case I have
Code: Select all
XKBMODEL="pc105"
XKBLAYOUT="de"
XKBVARIANT="nodeadkeys"
XKBOPTIONS="compose:caps,terminate:ctrl_alt_bksp"

BACKSPACE="guess"


Then the systemd keyboard-setup.service calls /lib/console-setup/keyboard-setup.sh, which in turn calls "setupcon -k", which does the actual work.
reinob
 
Posts: 858
Joined: 2014-06-30 11:42

Re: getting rid of dead keys

Postby morgon » 2020-11-05 21:42

I have this in my /etc/default/keyboard:

Code: Select all
XKBMODEL="pc105"
XKBLAYOUT="de"
XKBVARIANT="nodeadkeys"
XKBOPTIONS=""

BACKSPACE="guess"


I believe this content comes from running "dpkg-reconfigure keyboard-configuration".

However I still have dead keys (even after a reboot). Something is missing...
morgon
 
Posts: 174
Joined: 2010-08-28 03:04

Re: getting rid of dead keys

Postby Head_on_a_Stick » 2020-11-06 17:14

morgon wrote:Something is missing

Check localectl(1).
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12795
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: getting rid of dead keys

Postby morgon » 2020-11-07 00:52

When I run localectl without arguments I get this:

Code: Select all
   System Locale: LANG=en_US.UTF-8
                  LANGUAGE=en_US:en
       VC Keymap: n/a
      X11 Layout: de
       X11 Model: pc105
     X11 Variant: nodeadkeys


But I have dead keys.

When I run "localectl list-keymaps" I get

Code: Select all
Failed to read list of keymaps: No such file or directory
morgon
 
Posts: 174
Joined: 2010-08-28 03:04

Re: getting rid of dead keys

Postby morgon » 2020-11-25 07:50

I still have my dead keys and would be thankful for futher ideas on how to disable them.

Many thanks!
morgon
 
Posts: 174
Joined: 2010-08-28 03:04

Re: getting rid of dead keys

Postby reinob » 2020-11-25 19:22

Just to make sure we're not missing anything.
Can you check that you have "console-setup", "console-setup-linux" and "keyboard-configuration" installed?
(I guess at least keyboard-configuration is installed, since you mentioned using dpkg-reconfigure..)

Also, you say you run i3 and not a desktop envionment.
Do you run X manually (startx) or use some sort of login/display manager? (lightdm or such).
(I use lightdm with openbox, so no DE but a DM).

Other than that, maybe it's really something to do with testing (I use stable).
You could report it is a bug in keyboard-configuration and hope that someone either tells you what you've done wrong or can fix the bug if it is one.

As a workaround, if you use a DM, you can add your "setxkbmap de nodeadkeys" to your .xessionrc :)
(if no DM, then to .xinitrc if I remember correctly..)
reinob
 
Posts: 858
Joined: 2014-06-30 11:42

Re: getting rid of dead keys

Postby Head_on_a_Stick » 2020-11-25 19:45

reinob wrote:As a workaround, if you use a DM, you can add your "setxkbmap de nodeadkeys" to your .xessionrc :)
(if no DM, then to .xinitrc if I remember correctly..)

~/.xsessionrc also applies if 'startx' is used.

And ~/.xsession should be preferred over ~/.xinitrc:
man startx wrote:Note that in the Debian system, what many people traditionally put in the .xinitrc file should go in .xsession instead; this permits the same X environment to be presented whether startx, xdm, or xinit is used to start the X session.

But those files are not needed at all because 'startx' will automatically launch whatever is set as /etc/alternatives/x-session-manager (or /etc/alternatives/x-window-manager if nothing supplies x-session-manager) if there is no ~/.xsession or ~/.xinitrc
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12795
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: getting rid of dead keys

Postby morgon » 2020-11-26 22:40

Yes, "console-setup", "console-setup-linux" and "keyboard-configuration" are all installed.

I run lightdm and i3.

What is really stange to me (but then I don't really understand how this stuff works) is that even though in /etc/default/keyboard there is an explicit entry "XKBVARIANT="nodeadkeys"
I have dead keys not only in my X-terminals but also on the virtual text-consoles (if that is the proper term).
morgon
 
Posts: 174
Joined: 2010-08-28 03:04

Re: getting rid of dead keys

Postby reinob » 2020-11-27 06:47

Then it looks like it may be a bug in testing (which is good, as that is the whole point of testing testing :)

I have the exact same config, but instead of testing I use stable, and instead of i3 I use openbox.
nodeadkeys works as expected.

(I also map the "Caps Lock" to "Compose", so that I can still enter some characters not available on the keyboard).
reinob
 
Posts: 858
Joined: 2014-06-30 11:42

Re: getting rid of dead keys

Postby morgon » 2020-12-01 05:57

reinob wrote:Can you check that you have "console-setup", "console-setup-linux" and "keyboard-configuration" installed?


I have now upgraded these packages to the newest version and ran "dpkg-reconfigure keyboard-configuration" again.

I my virtual consoles the dead keys are gone now so that's good.

Unfortunately in the terminal-windows under X I still have dead keys.

I really don't get this...
morgon
 
Posts: 174
Joined: 2010-08-28 03:04


Return to System configuration

Who is online

Users browsing this forum: No registered users and 21 guests

fashionable