> On Sun, Jan 27, 2002 at 06:10:36PM +0100, Jan Martinek wrote:
> 
> Please always reply to our mailing list, no to me personally.
> 
> > > On Sun, Jan 27, 2002 at 05:09:31PM +0100, Jan Martinek wrote:
> > > > Hello,
> > > > 
> > > > some time ago I tried to send a bugreport (incoming, #837) but
> > > > I claimed rather missleading and vague information.
> > > > Let me please try to define the problem once more, from scratch:
> > > > 
> > > > Fvwm does not respond to key bindings if this condition is met:
> > > >  Czech keyboard layout is selected AND no window has focus.
> > > > 
> > > > This is the contents of my /.fvwm2rc 
> > > > It contains only one line defining key for starting rxvt
> > > > (shift+ctrl+r).
> > > > 
> > > > #beginning of /.fvwm2rc
> > > > Key r           A      SC      Exec exec rxvt
> > > > #end of /.fvwm2rc
> > > > 
> > > > this is the contents of .xinitrc
> > > > 
> > > > #beginning of /.xinitrc
> > > > setxkbmap 'cz(us_cz_prog)'
> > > > exec fvwm2
> > > > #end of /.xinitrc
> > > > 
> > > > (in case of XFree86-4.1.0-3 there must be
> > > > setxkbmap 'cz'
> > > > instead)
> > > 
> > > When I use
> > > 
> > >   setxkbmap 'cz'
> > > 
> > > I get this error message:
> > > 
> > >   > Error:            Can't find file "cz" for symbols include
> > >   >                   Exiting
> > >   >                   Abandoning symbols file "default"
> > > 
> > > And when I use
> > > 
> > >   setxkbmap 'cz(us_cz_prog)'
> > > 
> > > the X server crashes with a floating point exception as soon as I
> > > press any key.  How do I get that working?
> > 
> > I really have no idea why it crashes. It should work on plain Redhat
> > installation. But I will try this also on other distributions.
> 
> SuSE 7.2 here.

I tried the same on my friend's SuSE 7.3:

command
setxkbmap 'cz(us_cz_prog)'
failed with this error:

Error loading new keyboard description

so I tried

setxkbmap 'cz'

and this worked OK. It activated the czech keyboard layout.
The difference is probably in X server version. SuSE 7.3 has
xf86-4.1.0-52

SuSE 7.2 seems to have something older (4.0.3 maybe?).

But on SuSE I found something that makes me to change the description
of the strange behaviour. It worked fine with the czech keyboard
but wrong with the US layout! So on SuSE it was like this:

fvwm ignores key bindings if the keyboard was toggled from czech to US
AND no window has the focus.

And another thing:

fvwm ignores key bindings if the numlock was toggled on
AND no window has the focus. No matter what the keyboard
layout was.

HEY! NOW I found something similar on my system:

fvwm ignores key bindings if the capslock was toggled on
AND no window has the focus. No matter what the keyboard
layout is.

I cannot check out the numlock on my system, because I remapped
numlock to something else.


> 
> > > > How to reproduce the behaviour:
> > > > 
> > > > 1) startx
> > > > 2) Left Shift + Right Shift simultaneously
> > > >    this activates Czech keyboard layout
> > > > 3) shift+ctrl+r simultaneously - this should exec rxvt, but is does not!
> > > 
> > > Does the keycode of the r key change when you switch the layout?
> > > Fvwm is not aware of nor does it handle this situation.
> > 
> > No, this is not the reason. "r" remains on its position even on czech 
> > layout.
> > Fvwm ignores all key bindings. I tried many of them (F11, F12, Alt+Tab,
> > Ctrl+Shift+arrows, ...)
> > And, if some window has the focus, fvwm does what I want no matter what
> > the keyboard layout is. Keycode does not change.
> > Something must have been changed since version 2.2.4 that could influence
> > this. Would it be possible to find something in patches?
> 
> With CVS access and a lot of patience - yes.  You'd have to
> download the 2.3.x releases (35 releases) and see where it
> appeared first, look at the ChangeLog entries and try to find the
> guilty patch by downloading the CVS code from specific dates and
> then run a diff between the two versions.

I tested several versions which I downloaded from CVS. The bug
appeared probably somewhere between versions fvwm-2.3.6 and
2.2.5. I could not localize it better, because I was unable
to compile versions older than 2.3.6. But I have two rpm's
(2.2.4 and 2.2.5) that work fine.

fvwm2-2.2.5-4.i386.rpm   OK
fvwm2-2.2.4-9.i386.rpm   OK
fvwm-2.3.29-1            BUG
fvwm-2.3.10              BUG
fvwm-2.3.6               BUG
fvwm-2.3.2               unable to compile
fvwm-2.3.5               unable to compile
fvwm-2.2.5 (from CVS)    unable to compile
fvwm-2.2.4 (from CVS)    unable to compile


I followed these instructions:

autoreconf
automake --add-missing
./configure
make
make install


On versions that I was unable to compile I got this error:

autoheader: missing template: 


> 
> > > > Other interesting behaviour:
> > > > 1) startx
> > > > 2) shift+ctrl+r - runs rxvt
> > > > 3) Left Shift + Right Shift simultaneously
> > > >    this activates Czech keyboard layout
> > > > 4) if some window has focus, shift+ctrl+r runs another rxvt
> > > >    but if no window has focus, nothing happens.
> 
> That's really funny.  Obviously, the keyboard grabs are still
> there, but they don't work on the root window.  If you issue the
> fvwm command
> 
>   Recapture
> 

I will do it later, as soon as I figure out how to do it.

> after switching the layout, does it work then?  Does restarting
> fvwm (without restarting the X server) help?
> 
> Please add these lines to the HandleKeyPress() function in
> events.c, recompile and reinstall to see if fvwm gets the key
> strokes at all:
> 
>   void HandleKeyPress(void)
>   {
>     ...
>     /* Here's a real hack - some systems have two keys with the
>      * same keysym and different keycodes. This converts all
>      * the cases to one keycode. */
>   fprintf(stderr, "key press: kc1 0x%x, mods 0x%x ", Event.xkey.keycode, 
> Event.xkey.state);
>     Event.xkey.keycode =
>       XKeysymToKeycode(dpy,XKeycodeToKeysym(dpy,Event.xkey.keycode,0));
>   
>     /* Check if there is something bound to the key */
>     action = CheckBinding(Scr.AllBindings, STROKE_ARG(0) Event.xkey.keycode,
>                         Event.xkey.state, GetUnusedModifiers(), Context,
>                         KEY_BINDING);
>   fprintf(stderr, "kc2 0x%x, action '%s'\n", Event.xkey.keycode, 
> (action)?action:"");
>     ...
>   }
> 
> The two lines with the fprintf's are new; this is the latest code
> from CVS, but older Versions should look similar enough.
> 

Please have patience with me, I must ask someone more experienced to help
me with that.

> Bye
> 
> Dominik ^_^  ^_^
> 
>  --
> Dominik Vogt, [EMAIL PROTECTED]
> Reply-To: [EMAIL PROTECTED]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to