Skip to content
Browse files

make US layout keyboard full working

  • Loading branch information...
1 parent 247f11f commit 6d0bcddd7ce7d1543e013d011a53e50e66359455 Xiangfu Liu committed
Showing with 4 additions and 7 deletions.
  1. +4 −7 lib/keymap.c
View
11 lib/keymap.c
@@ -29,13 +29,10 @@
static int curr_layout = 2;
-/*TODO: ` - \ those three chars not working in US layout
- add french layout */
-
static char keymap[3][128] = {
- { 0,ESC,'1','2','3','4','5','6','7','8','9','0', 0, 0, BS,TAB, /* 16 */
+ { 0,ESC,'1','2','3','4','5','6','7','8','9','0','-','=', BS,TAB, /* 16 */
'q','w','e','r','t','y','u','i','o','p','[',']', LF, 0,'a','s', /* 32 */
- 'd','f','g','h','j','k','l',';','\'', 0, 0,'=','z','x','c','v', /* 48 */
+ 'd','f','g','h','j','k','l',';','\'','`',0,'\\','z','x','c','v', /* 48 */
'b','n','m',',','.','/', 0,'*', 0,' ', 0, 0, 0, 0, 0, 0, /* 64 */
0, 0, 0, 0, 0, 0, 0,'7','8','9','-','4','5','6','+','1', /* 80 */
'2','3','0','.', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 96 */
@@ -54,7 +51,7 @@ static char keymap[3][128] = {
};
static char shift[3][128] = {
- {' ', 0 , 0 , 0 , 0 , 0 , 0,'\"', 0 , 0 , 0 , 0 ,'<','_','>','?', /* 16 */
+ {' ', 0 , 0 , 0 , 0 , 0 , 0,'\"', 0, 0 , 0 , 0 ,'<','_','>','?', /* 16 */
')','!','@','#','$','%','^','&','*','(', 0 ,':', 0 ,'+', 0 , 0 , /* 32 */
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , /* 48 */
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,'{','|','}', 0 , 0 , /* 64 */
@@ -88,7 +85,7 @@ static char get_ascii(int keycode,int switches)
return result;
}
result-=32;
- if (result<64) return shift[curr_layout][(s32)result];
+ if (result<=64) return shift[curr_layout][(s32)result];
}
return result;
}

0 comments on commit 6d0bcdd

Please sign in to comment.
Something went wrong with that request. Please try again.