summaryrefslogtreecommitdiffstats
path: root/src/glut/fbdev/input.c
diff options
context:
space:
mode:
authorSean D'Epagnier <[email protected]>2006-08-27 01:16:09 +0000
committerSean D'Epagnier <[email protected]>2006-08-27 01:16:09 +0000
commita38aef93ab2a5006c3b8cfa50aaf48fafc0eb8d4 (patch)
treed40fc490f1019567ef8e5adbcaf577a86e434a7e /src/glut/fbdev/input.c
parent7e9737b3704b92865242d7564825cdc57db5c4c9 (diff)
The colormap code is now simpler, 15bpp works where it did not before.
The input is fixed so that delete reports '\b' and backspace 127 The vt switching works both right and left.
Diffstat (limited to 'src/glut/fbdev/input.c')
-rw-r--r--src/glut/fbdev/input.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/glut/fbdev/input.c b/src/glut/fbdev/input.c
index 791466911e1..b1362245f2f 100644
--- a/src/glut/fbdev/input.c
+++ b/src/glut/fbdev/input.c
@@ -138,7 +138,7 @@ static void KeyboardHandler(int sig)
if(labelval == K_RIGHT)
if(ioctl(ConsoleFD, VT_GETSTATE, &st) >= 0)
- vt = st.v_active - 1;
+ vt = st.v_active + 1;
if(vt != -1) {
if(Swapping)
@@ -224,7 +224,8 @@ static int ReadKey(void)
specialkey = GLUT_KEY_INSERT;
break;
case 51:
- code = '\b'; goto stdkey;
+ code = '\b';
+ goto stdkey;
case 91:
READKEY;
specialkey = GLUT_KEY_F1 + code - 65;
@@ -313,8 +314,8 @@ static int ReadKey(void)
if(KeyboardLedState & LED_SCR)
return 0;
- if(labelval >= K_F1 && labelval <= K_F12)
- specialkey = GLUT_KEY_F1 + labelval - K_F1;
+ if(labelvalnoshift >= K_F1 && labelvalnoshift <= K_F12)
+ specialkey = GLUT_KEY_F1 + labelvalnoshift - K_F1;
else
switch(labelvalnoshift) {
case K_LEFT:
@@ -335,8 +336,9 @@ static int ReadKey(void)
specialkey = GLUT_KEY_END; break;
case K_INSERT:
specialkey = GLUT_KEY_INSERT; break;
- case 127:
- labelval = '\b'; break;
+ case K_REMOVE:
+ labelval = '\b';
+ break;
case K_ENTER:
case K_ENTER - 1: /* keypad enter */
labelval = '\n'; break;