GSoC: dinput8 Action Mapping

Lucas Zawacki lfzawacki at
Sat Jun 25 00:10:31 CDT 2011

> As a hello word programmer, i can't judge the code quality, but i
> can say, that it worked nearly flawlessly. I was able to drive/play
> on keyboard :-D
That's very nice to hear :)

> The only issue i found in NFS's keyboard configuration:
> * When i press PAUSE KEY, then NFS says "Num_Lock"
> * When i press NUMLOCK KEY, then NFS says "Pause"
Hmm, actually I construct the mapping based on the positions of the
objects in the keyboard dataformat and PAUSE and NUM LOCK seem to be
in different positions in native and wine. Attached are two dumps of
the keyboard objects with builtin and native dinput for comparison.
-------------- next part --------------
enum_keyboard.cpp:61 - Operation successful
                          Escape ofs: 0x001 0x001 
                               1 ofs: 0x002 0x002 
                               2 ofs: 0x003 0x003 
                               3 ofs: 0x004 0x004 
                               4 ofs: 0x005 0x005 
                               5 ofs: 0x006 0x006 
                               6 ofs: 0x007 0x007 
                               7 ofs: 0x008 0x008 
                               8 ofs: 0x009 0x009 
                               9 ofs: 0x00a 0x00a 
                               0 ofs: 0x00b 0x00b 
                               - ofs: 0x00c 0x00c 
                               = ofs: 0x00d 0x00d 
                       BackSpace ofs: 0x00e 0x00e 
                             Tab ofs: 0x00f 0x00f 
                               Q ofs: 0x010 0x010 
                               W ofs: 0x011 0x011 
                               E ofs: 0x012 0x012 
                               R ofs: 0x013 0x013 
                               T ofs: 0x014 0x014 
                               Y ofs: 0x015 0x015 
                               U ofs: 0x016 0x016 
                               I ofs: 0x017 0x017 
                               O ofs: 0x018 0x018 
                               P ofs: 0x019 0x019 
                      dead_acute ofs: 0x01a 0x01a 
                               [ ofs: 0x01b 0x01b 
                          Return ofs: 0x01c 0x01c 
                       Control_L ofs: 0x01d 0x01d 
                               A ofs: 0x01e 0x01e 
                               S ofs: 0x01f 0x01f 
                               D ofs: 0x020 0x020 
                               F ofs: 0x021 0x021 
                               G ofs: 0x022 0x022 
                               H ofs: 0x023 0x023 
                               J ofs: 0x024 0x024 
                               K ofs: 0x025 0x025 
                               L ofs: 0x026 0x026 
                        ccedilla ofs: 0x027 0x027 
                               ~ ofs: 0x028 0x028 
                               ' ofs: 0x029 0x029 
                         Shift_L ofs: 0x02a 0x02a 
                               ] ofs: 0x02b 0x02b 
                               Z ofs: 0x02c 0x02c 
                               X ofs: 0x02d 0x02d 
                               C ofs: 0x02e 0x02e 
                               V ofs: 0x02f 0x02f 
                               B ofs: 0x030 0x030 
                               N ofs: 0x031 0x031 
                               M ofs: 0x032 0x032 
                               , ofs: 0x033 0x033 
                               . ofs: 0x034 0x034 
                               ; ofs: 0x035 0x035 
                         Shift_R ofs: 0x036 0x036 
                     KP_Multiply ofs: 0x037 0x037 
                           Alt_L ofs: 0x038 0x038 
                           space ofs: 0x039 0x039 
                       Caps_Lock ofs: 0x03a 0x03a 
                              F1 ofs: 0x03b 0x03b 
                              F2 ofs: 0x03c 0x03c 
                              F3 ofs: 0x03d 0x03d 
                              F4 ofs: 0x03e 0x03e 
                              F5 ofs: 0x03f 0x03f 
                              F6 ofs: 0x040 0x040 
                              F7 ofs: 0x041 0x041 
                              F8 ofs: 0x042 0x042 
                              F9 ofs: 0x043 0x043 
                             F10 ofs: 0x044 0x044 
                           Pause ofs: 0x045 0x045 
                     Scroll_Lock ofs: 0x046 0x046 
                         KP_Home ofs: 0x047 0x047 
                           KP_Up ofs: 0x048 0x048 
                        KP_Prior ofs: 0x049 0x049 
                     KP_Subtract ofs: 0x04a 0x04a 
                         KP_Left ofs: 0x04b 0x04b 
                        KP_Begin ofs: 0x04c 0x04c 
                        KP_Right ofs: 0x04d 0x04d 
                          KP_Add ofs: 0x04e 0x04e 
                          KP_End ofs: 0x04f 0x04f 
                         KP_Down ofs: 0x050 0x050 
                         KP_Next ofs: 0x051 0x051 
                       KP_Insert ofs: 0x052 0x052 
                       KP_Delete ofs: 0x053 0x053 
                               / ofs: 0x056 0x056 
                             F11 ofs: 0x057 0x057 
                             F12 ofs: 0x058 0x058 
                               \ ofs: 0x05e 0x05e 
                ISO_Level3_Shift ofs: 0x060 0x060 
                        Katakana ofs: 0x061 0x061 
                        Hiragana ofs: 0x062 0x062 
                     Henkan_Mode ofs: 0x063 0x063 
               Hiragana_Katakana ofs: 0x064 0x064 
                        Muhenkan ofs: 0x065 0x065 
                ISO_Level3_Shift ofs: 0x066 0x066 
                        Linefeed ofs: 0x067 0x067 
                               = ofs: 0x068 0x068 
                       plusminus ofs: 0x069 0x069 
                          Hangul ofs: 0x06a 0x06a 
                    Hangul_Hanja ofs: 0x06b 0x06b 
                          Cancel ofs: 0x06c 0x06c 
                            Redo ofs: 0x06d 0x06d 
                        SunProps ofs: 0x06e 0x06e 
                            Undo ofs: 0x06f 0x06f 
                        SunFront ofs: 0x070 0x070 
                         SunOpen ofs: 0x071 0x071 
                            Find ofs: 0x072 0x072 
                          Cancel ofs: 0x073 0x073 
                   XF86AudioMute ofs: 0x080 0x080 
                               1 ofs: 0x082 0x082 
                               2 ofs: 0x083 0x083 
                               3 ofs: 0x084 0x084 
                               4 ofs: 0x085 0x085 
                               5 ofs: 0x086 0x086 
                               6 ofs: 0x087 0x087 
                               7 ofs: 0x088 0x088 
                               8 ofs: 0x089 0x089 
                               9 ofs: 0x08a 0x08a 
                               0 ofs: 0x08b 0x08b 
                               - ofs: 0x08c 0x08c 
                               = ofs: 0x08d 0x08d 
                               Q ofs: 0x090 0x090 
                               W ofs: 0x091 0x091 
                               E ofs: 0x092 0x092 
                               R ofs: 0x093 0x093 
                               T ofs: 0x094 0x094 
                               Y ofs: 0x095 0x095 
                               U ofs: 0x096 0x096 
                               I ofs: 0x097 0x097 
                               O ofs: 0x098 0x098 
                               P ofs: 0x099 0x099 
                               [ ofs: 0x09b 0x09b 
                        KP_Enter ofs: 0x09c 0x09c 
                       Control_R ofs: 0x09d 0x09d 
                               A ofs: 0x09e 0x09e 
                               S ofs: 0x09f 0x09f 
                               D ofs: 0x0a0 0x0a0 
                               F ofs: 0x0a1 0x0a1 
                               G ofs: 0x0a2 0x0a2 
                               H ofs: 0x0a3 0x0a3 
                               J ofs: 0x0a4 0x0a4 
                               K ofs: 0x0a5 0x0a5 
                               L ofs: 0x0a6 0x0a6 
                               ~ ofs: 0x0a8 0x0a8 
                               ' ofs: 0x0a9 0x0a9 
                               ] ofs: 0x0ab 0x0ab 
                               Z ofs: 0x0ac 0x0ac 
                               X ofs: 0x0ad 0x0ad 
                               C ofs: 0x0ae 0x0ae 
                               V ofs: 0x0af 0x0af 
                               B ofs: 0x0b0 0x0b0 
                               N ofs: 0x0b1 0x0b1 
                               M ofs: 0x0b2 0x0b2 
                               , ofs: 0x0b3 0x0b3 
                               . ofs: 0x0b4 0x0b4 
                       KP_Divide ofs: 0x0b5 0x0b5 
                         Shift_R ofs: 0x0b6 0x0b6 
                           Print ofs: 0x0b7 0x0b7 
                              F1 ofs: 0x0bb 0x0bb 
                              F2 ofs: 0x0bc 0x0bc 
                              F3 ofs: 0x0bd 0x0bd 
                              F4 ofs: 0x0be 0x0be 
                              F5 ofs: 0x0bf 0x0bf 
                              F6 ofs: 0x0c0 0x0c0 
                              F7 ofs: 0x0c1 0x0c1 
                              F8 ofs: 0x0c2 0x0c2 
                              F9 ofs: 0x0c3 0x0c3 
                             F10 ofs: 0x0c4 0x0c4 
                        Num_Lock ofs: 0x0c5 0x0c5 
                            Home ofs: 0x0c7 0x0c7 
                              Up ofs: 0x0c8 0x0c8 
                           Prior ofs: 0x0c9 0x0c9 
                               - ofs: 0x0ca 0x0ca 
                            Left ofs: 0x0cb 0x0cb 
                           Right ofs: 0x0cd 0x0cd 
                               + ofs: 0x0ce 0x0ce 
                             End ofs: 0x0cf 0x0cf 
                            Down ofs: 0x0d0 0x0d0 
                            Next ofs: 0x0d1 0x0d1 
                          Insert ofs: 0x0d2 0x0d2 
                          Delete ofs: 0x0d3 0x0d3 
                               / ofs: 0x0d6 0x0d6 
                             F11 ofs: 0x0d7 0x0d7 
                             F12 ofs: 0x0d8 0x0d8 
                         Super_L ofs: 0x0db 0x0db 
                         Super_R ofs: 0x0dc 0x0dc 
                            Menu ofs: 0x0dd 0x0dd 
                               \ ofs: 0x0de 0x0de 
                               = ofs: 0x0e8 0x0e8 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: wine_dinput8_keyboard.txt
URL: <>

More information about the wine-devel mailing list