[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: Ctrl-Break Patch
From:       Ulrich Weigand <weigand () informatik ! uni-erlangen ! de>
Date:       1999-09-27 22:11:39
[Download RAW message or body]


>    Fix an entry in the Keyboard Translation Table in X11DRV/keyboard.c for
> Ctrl-Break.
>   Unfortunately, Ctrl-Break still doesn't work with Red Hat 6.0, because the
> KeySym is not defined (need to change some X11R6 files)

I've checked the XFree86 XKB extension files, and it would appear that
they specifically try to handle the Ctrl-Break key correctly; in fact,
there is a rather peculiar construction in /usr/X11R6/lib/X11/xkb/symbols/us:

    key <PAUS> {
        type= "PC_BREAK",
        symbols[Group1]= [ Pause, Break ]
    };

where the type "PC_BREAK" is defined in xkb/types/pc as

    type "PC_BREAK" {
        modifiers = Control;
        map[None] = Level1;
        map[Control] = Level2;
        level_name[Level1] = "Base";
        level_name[Level2] = "Control";
    };

Indeed, this leads to a default key map setting of:

    110         0xff13 (Pause)  0xff6b (Break)

so one would expect the Ctrl-Break key to work.

Unfortunately, trying to use the key with xev shows these results:

Just Pause:
KeyPress event, serial 22, synthetic NO, window 0x4800001,
    root 0x25, subw 0x0, time 2167261906, (102,97), root:(294,493),
    state 0x0, keycode 110 (keysym 0xff13, Pause), same_screen YES,
    XLookupString gives 0 characters:  ""

Ctrl+Pause (Break):
KeyPress event, serial 22, synthetic NO, window 0x4800001,
    root 0x25, subw 0x0, time 2167265194, (102,97), root:(294,493),
    state 0x4, keycode 114 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 characters:  ""

So, for some reason, it generates even a different *keycode*.  And,
of course, the default key map does not contain any mapping for 114,
thus it says NoSymbol ...

Now I'm not sure why this would happen.  Maybe Linux remaps the keycode
already before X even gets hold of it?  Any guru out there ... ?

In any case, there is a simple workaround:  just issue a 

   xmodmap -e 'keycode 114 = Break'

command, or add a line 

   keycode 114 = Break

to the /usr/X11R6/lib/X11/Xmodmap file ...

(B.t.w. the very same problem occurs with the Alt+Sysreq key, which is
 also remapped from keycode 111 to keycode 92, and thus has no associated
 KeySym.  In this case, the fix should probably be 'keycode 92 = Execute' ...)

Bye,
Ulrich

-- 
  Ulrich Weigand,
  IMMD 1, Universitaet Erlangen-Nuernberg,
  Martensstr. 3, D-91058 Erlangen, Phone: +49 9131 85-7688


=========================================================================

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic