Re: [STUMP] XKB input in Stumpwm?

Dirk Sondermann <[email protected]>
Newsgroups gmane.comp.window-managers.stumpwm.devel
Message-ID <[email protected]>
On 07/24/14 21:45, Milan Zamazal wrote:
> Other complaints from Debian users concern non-ASCII or Dvorak input in
> Stumpwm, e.g.:
> 
>   It is not possible to input cyrillic characters into stumpwm prompts,
>   so it is not possible to exec programs with cyrillic arguments.
> 
> What can be done about it?  It's probably more problem of CLX than of
> Stumpwm, is there any way to get working support for XKB input in SBCL
> and CLISP?

I'm not sure if that's a related problem, but I'm not able to enter
characters that require pressing the 'Alt Gr' key (e.g. '\' and '~'
on a german keyboard) into stumpwm prompts.

This problem is caused by the function 'code-state->key', which
assumes that the offset between the 'normal' and the 'Alt Gr'
keysyms is always 2:

  (let* ((mods    (xlib:make-state-keys state))
         (shift-p (and (find :shift mods) t))
         (altgr-p (and (intersection (modifiers-altgr *modifiers*) mods) t))
         (base    (if altgr-p 2 0))
         (sym     (xlib:keycode->keysym *display* code base))
         (upsym   (xlib:keycode->keysym *display* code (+ base 1))))

But on my system this offset actually is 4:

  $ xmodmap -pke | grep backslash
  keycode  20 = ssharp question ssharp question backslash questiondown U1E9E

So on my system the problem can be fixed by replacing (if altgr-p 2 0)
with (if altgr-p 4 0). But I haven't fount a way to use a calculated
offset in place of the constant at this point.

-- 
Dirk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.