Discussion:
[Fluxbox-users] fluxbox xorg hal evdev keyboard
f***@hamsandwich.ca
2009-07-28 14:41:48 UTC
Permalink
I switched from xorg 1.4 to xorg 1.5 with evdev and hal. I switch
between dvorak and qwerty keyboard variants. It's mostly working but
I'm finding fluxbox unaware that the mode has switched.

first a bit of background - here is my hal policy for switching
between qwerty and dvorak
/etc/hal/fdi/policy/10-x11-input.fdi:
<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
<match key="info.capabilities" contains="input.keyboard">
<merge key="input.x11_options.XkbLayout" type="string">us,us</merge>
<merge key="input.x11_options.XkbVariant"
type="string">,dvorak</merge>
<merge key="input.x11_options.XkbOptions"
type="strlist">grp:shift_toggle</merge>
<append key="input.x11_options.XkbOptions"
type="strlist">grp_led:caps</append>
<append key="input.x11_options.XkbOptions"
type="strlist">compose:ralt</append>
</match>
</deviceinfo>


.fluxbox/keys:
...
Mod4 p :ExecCommand mpc toggle
...


with the above fluxbox and hal config "Mod4 p" translates int a "mod4
qwerty-p"


here is the xev output:
dvorak-l/qwerty-p in dvorak mode:
KeyPress event, serial 28, synthetic NO, window 0x2000001,
root 0xea, subw 0x0, time 87880786, (167,184), root:(389,426),
state 0x2000, keycode 33 (keysym 0x6c, l), same_screen YES,
XKeysymToKeycode returns keycode: 46
XLookupString gives 1 bytes: (6c) "l"
XmbLookupString gives 1 bytes: (6c) "l"
XFilterEvent returns: False

KeyRelease event, serial 31, synthetic NO, window 0x2000001,
root 0xea, subw 0x0, time 87880850, (167,184), root:(389,426),
state 0x2000, keycode 33 (keysym 0x6c, l), same_screen YES,
XKeysymToKeycode returns keycode: 46
XLookupString gives 1 bytes: (6c) "l"
XFilterEvent returns: False


dvorak-l/qwerty-p in qwerty mode:
KeyPress event, serial 31, synthetic NO, window 0x2000001,
root 0xea, subw 0x0, time 87996130, (451,765), root:(673,1007),
state 0x0, keycode 33 (keysym 0x70, p), same_screen YES,
XLookupString gives 1 bytes: (70) "p"
XmbLookupString gives 1 bytes: (70) "p"
XFilterEvent returns: False

KeyRelease event, serial 31, synthetic NO, window 0x2000001,
root 0xea, subw 0x0, time 87996258, (451,765), root:(673,1007),
state 0x0, keycode 33 (keysym 0x70, p), same_screen YES,
XLookupString gives 1 bytes: (70) "p"
XFilterEvent returns: False


dvorak-p/qwerty-r in dvorak mode:
KeyPress event, serial 28, synthetic NO, window 0x2000001,
root 0xea, subw 0x0, time 88351058, (696,744), root:(940,1008),
state 0x2000, keycode 27 (keysym 0x70, p), same_screen YES,
XKeysymToKeycode returns keycode: 33
XLookupString gives 1 bytes: (70) "p"
XmbLookupString gives 1 bytes: (70) "p"
XFilterEvent returns: False

KeyRelease event, serial 31, synthetic NO, window 0x2000001,
root 0xea, subw 0x0, time 88351170, (696,744), root:(940,1008),
state 0x2000, keycode 27 (keysym 0x70, p), same_screen YES,
XKeysymToKeycode returns keycode: 33
XLookupString gives 1 bytes: (70) "p"
XFilterEvent returns: False


dvorak-p/qwerty-r in qwerty mode:
KeyPress event, serial 31, synthetic NO, window 0x2000001,
root 0xea, subw 0x0, time 88357346, (696,744), root:(940,1008),
state 0x0, keycode 27 (keysym 0x72, r), same_screen YES,
XLookupString gives 1 bytes: (72) "r"
XmbLookupString gives 1 bytes: (72) "r"
XFilterEvent returns: False

KeyRelease event, serial 31, synthetic NO, window 0x2000001,
root 0xea, subw 0x0, time 88357474, (696,744), root:(940,1008),
state 0x0, keycode 27 (keysym 0x72, r), same_screen YES,
XLookupString gives 1 bytes: (72) "r"
XFilterEvent returns: False



So "mod4 p" even though I'm in dvorak mode only works on/for the
qwerty-p. The fluxbox keys file is unaware of a change to dvorak
mode...

All the above is without an xorg.conf and no special .xmodmap settings.
x11-base/xorg-server-1.6.2-r1
sys-apps/hal-0.5.11-r9
x11-drivers/xf86-input-evdev-2.2.2
(my memory is hazy but I believe xorg 1.5 and evdev 2.1.3 behaved the
same way)

I notice XKeysymToKeycode is incorrect in the xev output - is this
significant? Is this a fluxbox or xorg problem?

Any help appreciated

Loading...