Lines 1151-1158
Link Here
|
1151 |
unsigned char type, raw_mode; |
1151 |
unsigned char type, raw_mode; |
1152 |
struct tty_struct *tty; |
1152 |
struct tty_struct *tty; |
1153 |
int shift_final; |
1153 |
int shift_final; |
1154 |
|
1154 |
|
|
|
1155 |
#define NONLATIN_LETTER_LOCK ((1 << VC_ALTGRLOCK) | (1 << VC_CTRLLLOCK) | (1 << VC_CTRLRLOCK)) |
1156 |
#define APPLY_CAPSLOCK if (vc_kbd_led(kbd, VC_CAPSLOCK)) { \ |
1157 |
key_map = key_maps[shift_final ^ (1 << KG_SHIFT)]; \ |
1158 |
if (key_map) \ |
1159 |
keysym = key_map[keycode]; \ |
1160 |
} |
1161 |
|
1155 |
tty = vc->vc_tty; |
1162 |
tty = vc->vc_tty; |
1156 |
|
1163 |
|
1157 |
if (tty && (!tty->driver_data)) { |
1164 |
if (tty && (!tty->driver_data)) { |
1158 |
/* No driver data? Strange. Okay we fix it then. */ |
1165 |
/* No driver data? Strange. Okay we fix it then. */ |
Lines 1252-1261
Link Here
|
1252 |
|
1259 |
|
1253 |
type = KTYP(keysym); |
1260 |
type = KTYP(keysym); |
1254 |
|
1261 |
|
1255 |
if (type < 0xf0) { |
1262 |
if (type < 0xf0) { |
1256 |
if (down && !raw_mode) |
1263 |
if (down && !raw_mode) { |
|
|
1264 |
// Assume that all input unicode chars are |
1265 |
// CAPSLOCK-sensitive letters |
1266 |
if ((shift_final & NONLATIN_LETTER_LOCK)) APPLY_CAPSLOCK; |
1267 |
|
1257 |
to_utf8(vc, keysym); |
1268 |
to_utf8(vc, keysym); |
|
|
1269 |
} |
1258 |
return; |
1270 |
return; |
1259 |
} |
1271 |
} |
1260 |
|
1272 |
|
1261 |
type -= 0xf0; |
1273 |
type -= 0xf0; |
Lines 1264-1276
Link Here
|
1264 |
return; |
1276 |
return; |
1265 |
|
1277 |
|
1266 |
if (type == KT_LETTER) { |
1278 |
if (type == KT_LETTER) { |
1267 |
type = KT_LATIN; |
1279 |
type = KT_LATIN; |
1268 |
if (vc_kbd_led(kbd, VC_CAPSLOCK)) { |
1280 |
APPLY_CAPSLOCK; |
1269 |
key_map = key_maps[shift_final ^ (1 << KG_SHIFT)]; |
|
|
1270 |
if (key_map) |
1271 |
keysym = key_map[keycode]; |
1272 |
} |
1273 |
} |
1281 |
} |
1274 |
|
1282 |
|
1275 |
(*k_handler[type])(vc, keysym & 0xff, !down, regs); |
1283 |
(*k_handler[type])(vc, keysym & 0xff, !down, regs); |
1276 |
|
1284 |
|