getting rid of dead keys

Kernels, Network, and Services configuration
Post Reply
Message
Author
morgon
Posts: 189
Joined: 2010-08-28 03:04

getting rid of dead keys

#1 Post by morgon »

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!

reinob
Posts: 953
Joined: 2014-06-30 11:42
Has thanked: 9 times
Been thanked: 3 times

Re: getting rid of dead keys

#2 Post by reinob »

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.

morgon
Posts: 189
Joined: 2010-08-28 03:04

Re: getting rid of dead keys

#3 Post by morgon »

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...

User avatar
Head_on_a_Stick
Posts: 13446
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: getting rid of dead keys

#4 Post by Head_on_a_Stick »

morgon wrote:Something is missing
Check localectl(1).
Black Lives Matter

Debian buster-backports ISO image: for new hardware support

morgon
Posts: 189
Joined: 2010-08-28 03:04

Re: getting rid of dead keys

#5 Post by morgon »

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: 189
Joined: 2010-08-28 03:04

Re: getting rid of dead keys

#6 Post by morgon »

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

Many thanks!

reinob
Posts: 953
Joined: 2014-06-30 11:42
Has thanked: 9 times
Been thanked: 3 times

Re: getting rid of dead keys

#7 Post by reinob »

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..)

User avatar
Head_on_a_Stick
Posts: 13446
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: getting rid of dead keys

#8 Post by Head_on_a_Stick »

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

morgon
Posts: 189
Joined: 2010-08-28 03:04

Re: getting rid of dead keys

#9 Post by morgon »

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).

reinob
Posts: 953
Joined: 2014-06-30 11:42
Has thanked: 9 times
Been thanked: 3 times

Re: getting rid of dead keys

#10 Post by reinob »

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).

morgon
Posts: 189
Joined: 2010-08-28 03:04

Re: getting rid of dead keys

#11 Post by morgon »

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...

Post Reply