nanogui: Keyboard events ...


Previous by date: 27 Oct 2000 18:33:18 -0000 Re: Keyboard events ..., Greg Haerr
Next by date: 27 Oct 2000 18:33:18 -0000 Re: Keyboard events ..., Ritesh Saigal
Previous in thread: 27 Oct 2000 18:33:18 -0000 Re: Keyboard events ..., Greg Haerr
Next in thread: 27 Oct 2000 18:33:18 -0000 Re: Keyboard events ..., Ritesh Saigal

Subject: Re: Keyboard events ...
From: Jordan Crouse ####@####.####
Date: 27 Oct 2000 18:33:18 -0000
Message-Id: <39F9CAC5.D5CFBE16@censoft.com>

Greg will probably go into this in more detail, but I'll give you the
short and skinny right now so you can at least keep working....

Basically, the X11 keyboard driver for MW does not grab the entire scan
code for the keystrokes, only the ascii value (lower 8 bits).  So
essentially we have no way of determining if a special key is pressed. 
This sucks rocks.  Greg will have to go into how he wants to fix this.

If you want to hack in support for a particular key right now (and keep
in mind that this is a major (I reapeat) major hack), we have discovered
that most of the "special" keys have the lower 8 bits that map outside
of the ascii values of the alpha numeric keys (all except for two in
fact).  So if you look for the lower 8 bits, you will be right 80% of
the time.  Once again, I stress that this is a hella-hack, I'm not
proud, and if you tell your friends that I told you, I will deny it.. :)

Below  are the ascii to special key mappings that we have discovered
(from FLNX).  Notice that sysReg and Insert are missing, as they are the
two keys that have the lower 8 bits that correspond to a alphanumeric
value (I think insert maps to a "c").  

Hope this helps, and I hope that someone soon will take it upon
themselves to fix this.

Happy hacking!
Jordan

  {'\r', FL_Enter},
  {'\b', FL_BackSpace},
  {'\t', FL_Tab},
  { 20 , FL_Scroll_Lock},
  { 80 , FL_Home},
  { 81 , FL_Left},
  { 82 , FL_Up},
  { 83 , FL_Right},
  { 84 , FL_Down},
  { 85 , FL_Page_Up},
  { 86 , FL_Page_Down},
  { 87 , FL_End},
  { 127, FL_Num_Lock},
  { 141, FL_KP_Enter},
  { 149, FL_KP+'7'},
  { 150, FL_KP+'4'},
  { 151, FL_KP+'8'},
  { 152, FL_KP+'6'},
  { 153, FL_KP+'2'},
  { 154, FL_KP+'9'},
  { 155, FL_KP+'3'},
  { 156, FL_KP+'1'},
  { 157, FL_KP+'5'},
  { 158, FL_KP+'0'},
  { 159, FL_KP+'.'},
  { 170, FL_KP+'*'},
  { 171, FL_KP+'+'},
  { 173, FL_KP+'-'},
  { 175, FL_KP+'/'},
  { 190, FL_F + 1},
  { 191, FL_F + 2},
  { 192, FL_F + 3},
  { 193, FL_F + 4},
  { 194, FL_F + 5},
  { 195, FL_F + 6},
  { 196, FL_F + 7},
  { 197, FL_F + 8},
  { 198, FL_F + 9},
  { 199, FL_F + 10},
  { 200, FL_F + 11},
  { 201, FL_F + 12},
  { 226, FL_Shift_R},
  { 225, FL_Shift_L},
  { 227, FL_Control_L},
  { 228, FL_Control_R},
  { 229, FL_Caps_Lock},
  { 233, FL_Alt_L},
  { 234, FL_Alt_R},
  { 255, FL_Delete},

Ritesh Saigal wrote:
> 
> Hi !!
> 
> I am having trouble catching the keyboard special keys in my
> application. I am able to catch the following keystrokes...
> [a-z]
> [0-9]
> [<>;'[]-\=]
> 
> I am unable to catch the following keys-
> [F1-F12]
> [Arrow-up,down,left,right]
> [Home,End,Pageup,Pagedn,Insert,Delete]
> 
> Something regarding this is given in the documentation. I tried
> following that but I am still unable to catch these keys. Can someone
> help me in this!!
> 
> Thanks & Regds,
> 
> Ritesh.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####

Previous by date: 27 Oct 2000 18:33:18 -0000 Re: Keyboard events ..., Greg Haerr
Next by date: 27 Oct 2000 18:33:18 -0000 Re: Keyboard events ..., Ritesh Saigal
Previous in thread: 27 Oct 2000 18:33:18 -0000 Re: Keyboard events ..., Greg Haerr
Next in thread: 27 Oct 2000 18:33:18 -0000 Re: Keyboard events ..., Ritesh Saigal


Powered by ezmlm-browse 0.20.