bug-xnee
[Top][All Lists]
Advanced

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

Re: [Bug-xnee] Update on bug 8138


From: Henrik Sandklef
Subject: Re: [Bug-xnee] Update on bug 8138
Date: Tue, 30 Mar 2004 02:44:28 +0200

Hi

Thanks for your mail(s) :) I will deal with the others asap. I have some
fixes for autorepeat which I will check in asap.

I have a fix for the problem as well. Lets compare the solution and see
which is best. Mine is all but straight forward so it'll probably be
yours :)

My solution:
0) create a modifier map with XGetModifierMapping

1) read a chracter from file and get its keysym (e.g "backslash")

2) from that keysym get its keycode*

3) create an event (XEvent) with keycode as above and modifier=0

4) do XLookupString on the event and check the result. If it is the
desired keysym (e.g. "backslash"). If not do (3) again with
modifier=shift and go to (4)...... do this for all modifiers. Remember
which index number (e.g "7" as in the backslash case).

5) when having the modifier (or not) we need to fake the keysym we
simply have to get the meycode of that modifier. This is done by looking
at the index number above in the modifiermap.

.... this will work for all keyboards.... errrh. Famous last word ;)



*) for keysym "backslash" the keycode will be the keycode of "+" 

On Mon, 2004-03-29 at 00:47, Joseph Miele wrote:
> I have figured out a way to determine if the SHIFT key needs to be 
> pressed to generate a character in such a way that it will work on 
> Swedish and American and hopefully all sorts of other keyboards. I was 
> going to add the code to this comment, but I see that there is another 
> issue.

Can you describe your solution?

> Apparently, you need to press yet another modifier key in order to type 
> an "at" sign on your keyboard. This means I need to make my new code 
> smart enough to determine when to press that new modifier.
O yes ... :(

> Unfortunately, I don't have a Swedish keyboard with which to test the 
> code. So, I need to ask some questions.
> 
> 1. What keys do you need to press to get the "at" sign?
"Alt Gr" and "2"

> 2. What is printed to your screen if you type the command "xmodmap -pm" 
> from an xterm window?

address@hidden:~/src$ xmodmap -pm
xmodmap:  up to 2 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x6d)
mod1        Alt_L (0x40)
mod2        Num_Lock (0x4d)
mod3      
mod4        Super_L (0x73),  Super_R (0x74)
mod5        ISO_Level3_Shift (0x71)


> 3. What is the output of the command "xmodmap -pke"?
address@hidden:~/src$ xmodmap -pke
keycode   8 =
keycode   9 = Escape
keycode  10 = 1 exclam
keycode  11 = 2 quotedbl
keycode  12 = 3 numbersign
keycode  13 = 4 currency
keycode  14 = 5 percent
keycode  15 = 6 ampersand
keycode  16 = 7 slash
keycode  17 = 8 parenleft
keycode  18 = 9 parenright
keycode  19 = 0 equal
keycode  20 = plus question
keycode  21 = dead_acute dead_grave
keycode  22 = BackSpace Terminate_Server
keycode  23 = Tab ISO_Left_Tab
keycode  24 = q Q
keycode  25 = w W
keycode  26 = e E
keycode  27 = r R
keycode  28 = t T
keycode  29 = y Y
keycode  30 = u U
keycode  31 = i I
keycode  32 = o O
keycode  33 = p P
keycode  34 = aring Aring
keycode  35 = dead_diaeresis dead_circumflex
keycode  36 = Return
keycode  37 = Control_L
keycode  38 = a A
keycode  39 = s S
keycode  40 = d D
keycode  41 = f F
keycode  42 = g G
keycode  43 = h H
keycode  44 = j J
keycode  45 = k K
keycode  46 = l L
keycode  47 = odiaeresis Odiaeresis
keycode  48 = adiaeresis Adiaeresis
keycode  49 = section onehalf
keycode  50 = Shift_L
keycode  51 = apostrophe asterisk
keycode  52 = z Z
keycode  53 = x X
keycode  54 = c C
keycode  55 = v V
keycode  56 = b B
keycode  57 = n N
keycode  58 = m M
keycode  59 = comma semicolon
keycode  60 = period colon
keycode  61 = minus underscore
keycode  62 = Shift_R
keycode  63 = KP_Multiply XF86_ClearGrab
keycode  64 = Alt_L Meta_L
keycode  65 = space space
keycode  66 = Caps_Lock
keycode  67 = F1 XF86_Switch_VT_1
keycode  68 = F2 XF86_Switch_VT_2
keycode  69 = F3 XF86_Switch_VT_3
keycode  70 = F4 XF86_Switch_VT_4
keycode  71 = F5 XF86_Switch_VT_5
keycode  72 = F6 XF86_Switch_VT_6
keycode  73 = F7 XF86_Switch_VT_7
keycode  74 = F8 XF86_Switch_VT_8
keycode  75 = F9 XF86_Switch_VT_9
keycode  76 = F10 XF86_Switch_VT_10
keycode  77 = Num_Lock Pointer_EnableKeys
keycode  78 = Scroll_Lock
keycode  79 = KP_Home KP_7
keycode  80 = KP_Up KP_8
keycode  81 = KP_Prior KP_9
keycode  82 = KP_Subtract XF86_Prev_VMode
keycode  83 = KP_Left KP_4
keycode  84 = KP_Begin KP_5
keycode  85 = KP_Right KP_6
keycode  86 = KP_Add XF86_Next_VMode
keycode  87 = KP_End KP_1
keycode  88 = KP_Down KP_2
keycode  89 = KP_Next KP_3
keycode  90 = KP_Insert KP_0
keycode  91 = KP_Delete KP_Separator
keycode  92 = Print Sys_Req
keycode  93 =
keycode  94 = less greater
keycode  95 = F11 XF86_Switch_VT_11
keycode  96 = F12 XF86_Switch_VT_12
keycode  97 = Home
keycode  98 = Up
keycode  99 = Prior
keycode 100 = Left
keycode 101 =
keycode 102 = Right
keycode 103 = End
keycode 104 = Down
keycode 105 = Next
keycode 106 = Insert
keycode 107 = Delete
keycode 108 = KP_Enter
keycode 109 = Control_R
keycode 110 = Pause Break
keycode 111 = Print Sys_Req
keycode 112 = KP_Divide XF86_Ungrab
keycode 113 = ISO_Level3_Shift Multi_key
keycode 114 = Pause Break
keycode 115 = Super_L
keycode 116 = Super_R
keycode 117 = Menu
keycode 118 =
keycode 119 =
... all zeros from here on

> Hopefully, I can use this information to design code smart enough to 
> print "at" signs on both Swedish and American keyboards.
Does it work for "all" keyboards?
> - Joe
> 
> 
> 
> _______________________________________________
> Bug-xnee mailing list
> address@hidden
> http://mail.nongnu.org/mailman/listinfo/bug-xnee





reply via email to

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