From 2dd67439729b532a13c3b47e5e86f62655d94542 Mon Sep 17 00:00:00 2001 From: oroborus Date: Tue, 29 Jul 2008 18:49:44 +0000 Subject: - moznost brat takmer vsetky klavesy ( len nehovorte,ze chete numlock ) git-svn-id: http://opensvn.csie.org/tuxanci_ng@180 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e --- src/widget/widget_catchkey.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/widget') diff --git a/src/widget/widget_catchkey.c b/src/widget/widget_catchkey.c index df5a537..5b6f82d 100644 --- a/src/widget/widget_catchkey.c +++ b/src/widget/widget_catchkey.c @@ -16,6 +16,7 @@ widget_catchkey_t* newWidgetCatchkey(int key, int x, int y, void *event) new->y = y; new->key = key; new->fce_event = event; + new->active = FALSE; return new; } @@ -56,8 +57,15 @@ static int getPessAnyKey() mapa = SDL_GetKeyState(NULL); - for( i = SDLK_FIRST ; i <= SDLK_F15 ; i++ ) + for( i = SDLK_FIRST ; i <= SDLK_COMPOSE ; i++ ) { + if( i == SDLK_NUMLOCK || // black key + i == SDLK_CAPSLOCK || + i == SDLK_SCROLLOCK ) + { + continue; + } + if( mapa[i] == SDL_PRESSED ) { return i; -- cgit v1.2.3