]> git.sur5r.net Git - cc65/commitdiff
Prepare for reading keypresses from the X server.
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 12 Nov 2009 11:19:44 +0000 (11:19 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 12 Nov 2009 11:19:44 +0000 (11:19 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@4461 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/sim65/chips/console.c

index ad520c5d49df1aacbe494bf5910313526594469b..fbc75010126da15e95e27f41ca11b7dfc7c2d628 100644 (file)
@@ -410,7 +410,7 @@ static void* ScreenCreateInstance (unsigned Addr, unsigned Range, void* CfgInfo)
     XDefineCursor (V->ScreenDisplay, V->ScreenWindow, C);
 
     /* Select input events */
-    XSelectInput (V->ScreenDisplay, V->ScreenWindow, ExposureMask | StructureNotifyMask);
+    XSelectInput (V->ScreenDisplay, V->ScreenWindow, ExposureMask | StructureNotifyMask | KeyPressMask);
 
     /* Show the window */
     XMapRaised (V->ScreenDisplay, V->ScreenWindow);
@@ -626,8 +626,15 @@ static void ScreenEventLoop (void)
                 XRefreshKeyboardMapping (&Event.xmapping);
                 break;
 
+            case KeyPress:
+                break;
+
+            default:
+                /* Ignore anything else */
+                break;
+
         }
-    }
+    }                 
 
     /* Flush the outgoing event queue */
     XFlush (VScreen->ScreenDisplay);