YDL 3.0 keys in X
Today I was fighting with YDL 3.0 keys in X Windows. I’ve previous
fought with keys in X on my
Powerbook.
Option "CustomKeycodes" and the other modifications described in
that entry weren’t sufficient for only one reason: somehow, right
arrow starts sending the keycode for home. I can’t seem to find a way
to change this without going to the source to at least add some
logging statements, since I don’t entirely grasp how all of Xkb
works. (OK, that’s a lie: I basically understand none of it.)
The default key setup in X this time is almost passable, though, as opposed to YDL 2.3. I still have this problem of a lack of insert and delete keys, though. Now I’ve got the enter key next to the space bar, which is keypad enter, mapped to insert; and Fn + right Alt, which is usually… Alt_R (right Alt; if you don’t press Fn, it’s still left Alt, Alt_L), mapped to delete since I use it far less frequently. This worked out well enough.
That was too easy, though, so I had to find something else wrong.
Namely, Alt was being treated as Alt, and the Apple key was being
treated as Meta. Fuckers! I couldn’t get this fixed up in
~/.Xmodmap either, no matter how hard I tried. The problem with
this was that I couldn’t do Apple key + backspace in a terminal
window, which is like Emacs’ backward-kill-word. This just
wouldn’t do. Of course, after dicking with xmodmap forever, I decided
to search on something like “emacs alt meta.” This revealed the
existence of the altwin option. I gather this option is most used
for working with the two Windows keys on a PC-104 keyboard, to set the
Windows key to Meta or Alt or other combinations like that. You can
check out /usr/X11R6/lib/X11/xkb/rules/xfree86.lst for a list of
different options it seems. I tried Option "XkbOptions"
"altwin:meta_alt" and it worked: now my Apple key works as Meta, but
I can backward-kill-word in gnome-terminal/bash. Happy days.
As a bonus, here’s my new ~/.Xmodmap:
keycode 108 = Insert keycode 113 = Delete remove Mod1 = Alt_R
Also, I had to use the Gnome menu editing fix mentioned in my
previous
entry.
Worked like a charm. gtkpbbuttons keeps dying and I can’t seem to get
it to restart. Don’t forget you can set trackball options in
/etc/sysconfig/trackpad, though I kind of suspect that the
trackpad service isn’t starting properly, or its settings are
later being overridden, so I have to service restart trackpad
when I first log in to X. YDL 3.0’s /etc/sysconfig/i18n doesn’t
have UTF-8 in it — hallelujah. fnset still isn’t included, but
you can fondle the kbdmode setting in /etc/pbbuttonsd.conf. I
left mouse button emulation on and set it to use F11 and F12 for
middle and right mouse buttons, respectively. I turned this off
before, but now I’m thinking it’s a good thing. (Note: must stop
watching Martha Stewart media with darkho.)