stumpwm-devel
[Top][All Lists]
Advanced

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

Re: [STUMP] XKB input in Stumpwm?


From: Dirk Sondermann
Subject: Re: [STUMP] XKB input in Stumpwm?
Date: Fri, 25 Jul 2014 23:08:24 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]