summaryrefslogtreecommitdiff
path: root/src/client/chat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/chat.c')
-rw-r--r--src/client/chat.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/client/chat.c b/src/client/chat.c
index 9d35519..ca98389 100644
--- a/src/client/chat.c
+++ b/src/client/chat.c
@@ -143,13 +143,21 @@ static void processMessageKey(SDL_keysym keysym)
/* here would be much better to put 'strcat' as 'line' is expected
* to be full of '0' up to its end
*/
- line[len] = keysym.sym;
+ char c = keysym.sym;
+
+ /* TODO: should correspond with ASCII table */
+ if (keysym.mod & KMOD_RSHIFT)
+ c --;
+
+ line[len] = c;
+ return;
}
/* processing of letters */
if (keysym.sym >= SDLK_a && keysym.sym <= SDLK_z) {
char c = keysym.sym;
- if (keysym.mod == KMOD_SHIFT) {
+
+ if (keysym.mod & KMOD_SHIFT) {
c = toupper(c);
}
/* here would be much better to put 'strcat' as 'line' is expected