View Single Post
Posts: 77 | Thanked: 63 times | Joined on Sep 2009
#8
I suggest also trying to give the setxkbmap command the -print option. That way you will see what it resolves as the keymap and what it is trying to load as the keymap. Also try something like (again as user, not root):

% xkbcomp -i 4 :0.0 /tmp/foo.text

This reads the current keyboard map for device 4 to the file /tmp/foo.text. This is just to see that you can actually access the keyboard map. I suggest doing this before you do setxkbmap and then again after (to a different file) and checking to see that you actually installed the changes.

Two things to note once you get this to work. First, I noticed quite reliably that the new keymap doesn't take effect until you press some key on the internal keyboard. But pressing a single key will cause it to take effect. I don't know why. This makes it difficult to automate this via a script. Second, the modified keymap is lost when the bluetooth connection is dropped (and reestablished). So you need to redo the setxkbmap. I noticed over several days of use that the bluetooth connection can be dropped and reestablished sporadically, perhaps several dozen times over the course of 3-4 days. It will also drop the connection when the screen blanks, the keyboard is not used for a while, or you take a phone call. The combination of these two issues is such that when the connection is dropped and reestablished you need to rerun the setxkbmap command and then type a key on the internal keyboard. Pretty annoying, even when I have a shell script for the setxkbmap command. I'm sure there is a way to solve this but I haven't figured it out yet.