tech-x11 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Protocol wskbd vs. Protocol standard



> > Because all OpenBSD MD kernel keyboard drivers provide "rawmap"s
> > which return PC XT scancodes for X servers?
> 
> We seriously need to sit down and (1) spec and (2) implement finaly a
> real solution, e.g. based on USB scan codes or some superset of it and
> feed those to wsmux directly from the hardware driver, and also create
> a X keyboard driver to receive them in the same format from wsmux, and
> then not go through the horrifying levels of indirection inside X.
> 
> I want to run a sun kbd and a usb one through the same mux with a single
> X server!

I'm not an Xserver guru so I could be wrong,
but we may have ~three choices:

(1) Implement all proper MD keycode and keymaps in
    xsrc/external/mit/xkeyboard-config/dist/
    and choose appropriate type and maps in config files

 Probably this is the perfect world, but I doubt we can reach there.
 (though hpcarm and zaurus have own keymaps there for Sharp machines)
 xsrc/external/mit/xkeyboard-config/dist/symbols/sharp_vndr/

(2) add more translation maps (MD keycode to PC XT) in xorg wskbd driver

 This is the current strategy and probably the easist way.

 Furthermore, some inputmethod programs (at least ibus) assumes
 raw PC XT keycode.
 It was so annoying for mlterm-fb with USB keyboard or other non-PC kbd:
 
https://bitbucket.org/arakiken/mlterm/src/ee8a8a89dadf930ac92b894d04425b153688dee9/xwindow/fb/x_display.c?at=default#cl-1623

 This might be the one of the reason why OpenBSD uses XT code
 as the "raw" keycode even in the kernel drivers.

(3) generate soemwhat consistent keycode for xserver in MI wskbd/wsmux?

 I don't know if we can have such proper API.

 At least current wsmux(4) looks a bit annoying to use multiple types
 of keyboards (non PC native keyboard + USB Keyboard etc).


Anyway, I'm afread there are few reasonable solution.
There are too many applications that assumes only raw PC XT or USB.

---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index