Re: setxkbmap vs. offboard keyboards [was: Acer C720 review]

On 14/03/14 18:41, Trent W. Buck wrote:
1. Run setxkbmap -option ctrl:nocaps -option altwin:ctrl_win I can't see an option in setxkbmap to say "bloody well set this permanently?"
There are the XKBOPTIONS in /etc/default/keyboard, but I'm guessing you don't want this remapping as a system wide default? Glenn -- sks-keyservers.net 0x6d656d65

Glenn McIntosh <neonsignal@meme.net.au> writes:
On 14/03/14 18:41, Trent W. Buck wrote:
1. Run setxkbmap -option ctrl:nocaps -option altwin:ctrl_win I can't see an option in setxkbmap to say "bloody well set this permanently?"
There are the XKBOPTIONS in /etc/default/keyboard, but I'm guessing you don't want this remapping as a system wide default?
I did that. If I plug in a keyboard after X has started, it forgets the settings that are set there.

trentbuck@gmail.com (Trent W. Buck) writes:
Glenn McIntosh <neonsignal@meme.net.au> writes:
On 14/03/14 18:41, Trent W. Buck wrote:
1. Run setxkbmap -option ctrl:nocaps -option altwin:ctrl_win I can't see an option in setxkbmap to say "bloody well set this permanently?"
There are the XKBOPTIONS in /etc/default/keyboard, but I'm guessing you don't want this remapping as a system wide default?
I did that. If I plug in a keyboard after X has started, it forgets the settings that are set there.
(To be clear, I'm setting /etc/default/keyboard *and* calling setupcon on ~/.console-setup for tty logins *and* calling setxkbmap for X sessions.) At least part of the problem was XKBOPTIONS="altwin:ctrl_win ctrl:nocaps" is wrong, ignoring at least the first option; XKBOPTIONS="altwin:ctrl_win,ctrl:nocaps" honors at least the first option. (I don't have an external keyboard handy today to test the other half.)

trentbuck@gmail.com (Trent W. Buck) writes:
1. Run setxkbmap -option ctrl:nocaps -option altwin:ctrl_win I can't see an option in setxkbmap to say "bloody well set this permanently?"
There are the XKBOPTIONS in /etc/default/keyboard, but I'm guessing you don't want this remapping as a system wide default?
I did that. If I plug in a keyboard after X has started, it forgets the settings that are set there.
(To be clear, I'm setting /etc/default/keyboard *and* calling setupcon on ~/.console-setup for tty logins *and* calling setxkbmap for X sessions.)
At least part of the problem was
XKBOPTIONS="altwin:ctrl_win ctrl:nocaps"
is wrong, ignoring at least the first option;
XKBOPTIONS="altwin:ctrl_win,ctrl:nocaps"
honors at least the first option.
(I don't have an external keyboard handy today to test the other half.)
Update: this was the whole problem. Set host-wide, adding & removing keyboards doesn't break as it did when set correctly user-wide and set incorrectly host-wide.

On 15/03/14 14:19, Trent W. Buck wrote:
At least part of the problem was XKBOPTIONS="altwin:ctrl_win ctrl:nocaps" is wrong
Yeah, I've been caught out by that one before too.
(To be clear, I'm setting /etc/default/keyboard *and* calling setupcon on ~/.console-setup for tty logins *and* calling setxkbmap for X sessions.)
I ran a quick test, just with a second USB keyboard (I don't have a bluetooth one to try), and it behaved as expected - ie, the options in /etc/default/keyboard were being applied to the keyboard connected after X is already running (Debian Wheezy). I didn't test the console setup. If you still have no joy, another possibility you've probably thought of already would be to put an InputClass stanza into xorg.conf which matches the external keyboard, and set the xkboptions there. Glenn -- sks-keyservers.net 0x6d656d65
participants (2)
-
Glenn McIntosh
-
trentbuck@gmail.com