Diff for /np2/x11/gtk2/gtk_keyboard.c between versions 1.1 and 1.2

version 1.1, 2004/07/14 16:01:40 version 1.2, 2004/07/15 14:24:33
Line 39 Line 39
   
 #define NC      KEYBOARD_KC_NC  #define NC      KEYBOARD_KC_NC
   
 static const BYTE xkeyconv_jis[256] = {  static const UINT8 xkeyconv_jis[256] = {
         /*          ,    ,    ,    ,    ,    ,    ,             ; 0x00 */          /*          ,    ,    ,    ,    ,    ,    ,             ; 0x00 */
                   NC,  NC,  NC,  NC,  NC,  NC,  NC,  NC,                    NC,  NC,  NC,  NC,  NC,  NC,  NC,  NC,
         /*          ,    ,    ,    ,    ,    ,    ,             ; 0x08 */          /*          ,    ,    ,    ,    ,    ,    ,             ; 0x08 */
Line 106  static const BYTE xkeyconv_jis[256] = { Line 106  static const BYTE xkeyconv_jis[256] = {
                   NC,  NC,  NC,  NC,  NC,  NC,  NC,  NC                    NC,  NC,  NC,  NC,  NC,  NC,  NC,  NC
 };  };
   
 static const BYTE xkeyconv_ascii[256] = {  static const UINT8 xkeyconv_ascii[256] = {
         /*          ,    ,    ,    ,    ,    ,    ,             ; 0x00 */          /*          ,    ,    ,    ,    ,    ,    ,             ; 0x00 */
                   NC,  NC,  NC,  NC,  NC,  NC,  NC,  NC,                    NC,  NC,  NC,  NC,  NC,  NC,  NC,  NC,
         /*          ,    ,    ,    ,    ,    ,    ,             ; 0x08 */          /*          ,    ,    ,    ,    ,    ,    ,             ; 0x08 */
Line 173  static const BYTE xkeyconv_ascii[256] =  Line 173  static const BYTE xkeyconv_ascii[256] = 
                   NC,  NC,  NC,  NC,  NC,  NC,  NC,  NC,                    NC,  NC,  NC,  NC,  NC,  NC,  NC,  NC,
 };  };
   
 static const BYTE xkeyconv_misc[256] = {  static const UINT8 xkeyconv_misc[256] = {
         /*          ,    ,    ,    ,    ,    ,    ,             ; 0x00 */          /*          ,    ,    ,    ,    ,    ,    ,             ; 0x00 */
                   NC,  NC,  NC,  NC,  NC,  NC,  NC,  NC,                    NC,  NC,  NC,  NC,  NC,  NC,  NC,  NC,
         /*        BS, TAB,  LF, CLR,    , RET,    ,             ; 0x08 */          /*        BS, TAB,  LF, CLR,    , RET,    ,             ; 0x08 */
Line 240  static const BYTE xkeyconv_misc[256] = { Line 240  static const BYTE xkeyconv_misc[256] = {
                   NC,  NC,  NC,  NC,  NC,  NC,  NC,0x39                    NC,  NC,  NC,  NC,  NC,  NC,  NC,0x39
 };  };
   
 static const BYTE *xkeyconv = xkeyconv_jis;  static const UINT8 *xkeyconv = xkeyconv_jis;
 static BYTE shift_stat = 0x00;  static UINT8 shift_stat = 0x00;
   
 BOOL  BOOL
 kbdmng_init(void)  kbdmng_init(void)
Line 256  kbdmng_init(void) Line 256  kbdmng_init(void)
         return SUCCESS;          return SUCCESS;
 }  }
   
 static BYTE  static UINT8
 get_data(guint keysym, BYTE down)  get_data(guint keysym, UINT8 down)
 {  {
         BYTE data;          UINT8 data;
   
         if (keysym & ~0xff) {          if (keysym & ~0xff) {
                 if (keysym == GDK_VoidSymbol) {                  if (keysym == GDK_VoidSymbol) {
Line 290  get_data(guint keysym, BYTE down) Line 290  get_data(guint keysym, BYTE down)
 void  void
 gtkkbd_keydown(guint keysym)  gtkkbd_keydown(guint keysym)
 {  {
         BYTE data;          UINT8 data;
   
         data = get_data(keysym, 0x80);          data = get_data(keysym, 0x80);
         if (data != NC) {          if (data != NC) {
                 if ((data & 0x80) == 0) {                  if ((data & 0x80) == 0) {
                         keystat_senddata(data);                          keystat_senddata(data);
                 } else {                  } else {
                         BYTE s = (shift_stat & 0x80) | 0x70;                          UINT8 s = (shift_stat & 0x80) | 0x70;
                         keystat_senddata(s);                          keystat_senddata(s);
                         keystat_senddata(data & 0x7f);                          keystat_senddata(data & 0x7f);
                         keystat_senddata(s ^ 0x80);                          keystat_senddata(s ^ 0x80);
Line 308  gtkkbd_keydown(guint keysym) Line 308  gtkkbd_keydown(guint keysym)
 void  void
 gtkkbd_keyup(guint keysym)  gtkkbd_keyup(guint keysym)
 {  {
         BYTE data;          UINT8 data;
   
         data = get_data(keysym, 0x00);          data = get_data(keysym, 0x00);
         if (data != NC) {          if (data != NC) {

Removed from v.1.1  
changed lines
  Added in v.1.2


RetroPC.NET-CVS <cvs@retropc.net>