diff options
| author | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-07-29 18:49:44 +0000 |
|---|---|---|
| committer | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-07-29 18:49:44 +0000 |
| commit | 2dd67439729b532a13c3b47e5e86f62655d94542 (patch) | |
| tree | 9199d6e9b32480037b99479dfd027522d1412244 /src/widget | |
| parent | 3b66d10f0f0f47894a2cc0aba81035fa534a2b06 (diff) | |
- 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
Diffstat (limited to 'src/widget')
| -rw-r--r-- | src/widget/widget_catchkey.c | 10 |
1 files changed, 9 insertions, 1 deletions
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; |