diff options
Diffstat (limited to 'src/client/chat.c')
| -rw-r--r-- | src/client/chat.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/client/chat.c b/src/client/chat.c index b599853..bad3826 100644 --- a/src/client/chat.c +++ b/src/client/chat.c @@ -91,6 +91,22 @@ static void readKey() int len; int i; + const int len_shift_map = 20; + + char shift_map[] = + { + '-', '_', + '=', '+', + '[', '{', + ']', '}', + ';', ':', + '/', '\"', + '\\', '|', + ',', '<', + '.', '>', + '/', '?' + }; + if (line_atime < 100) line_atime ++; @@ -149,6 +165,22 @@ static void readKey() if( mapa[SDLK_LSHIFT] == SDL_PRESSED || mapa[SDLK_RSHIFT] == SDL_PRESSED) { + int i; + + for( i = 0 ; i < len_shift_map ; i+= 2 ) + { + if( c == shift_map[i] ) + { + line[len] = shift_map[i+1]; + } + } + + return; + } + + if( mapa[SDLK_LSHIFT] == SDL_PRESSED || + mapa[SDLK_RSHIFT] == SDL_PRESSED) + { line[len] -= 32; } |