From 884aff919172c188e61bb3a2f0582ada1d1dfc0e Mon Sep 17 00:00:00 2001 From: uz Date: Thu, 12 Nov 2009 11:19:44 +0000 Subject: [PATCH] Prepare for reading keypresses from the X server. git-svn-id: svn://svn.cc65.org/cc65/trunk@4461 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/sim65/chips/console.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/sim65/chips/console.c b/src/sim65/chips/console.c index ad520c5d4..fbc750101 100644 --- a/src/sim65/chips/console.c +++ b/src/sim65/chips/console.c @@ -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); -- 2.39.5