diff options
Diffstat (limited to 'drivers/char/keyboard.c')
-rw-r--r-- | drivers/char/keyboard.c | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c index d95f316afb5a..5ae2a3250c50 100644 --- a/drivers/char/keyboard.c +++ b/drivers/char/keyboard.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/kbd_kern.h> | 38 | #include <linux/kbd_kern.h> |
39 | #include <linux/kbd_diacr.h> | 39 | #include <linux/kbd_diacr.h> |
40 | #include <linux/vt_kern.h> | 40 | #include <linux/vt_kern.h> |
41 | #include <linux/consolemap.h> | ||
41 | #include <linux/sysrq.h> | 42 | #include <linux/sysrq.h> |
42 | #include <linux/input.h> | 43 | #include <linux/input.h> |
43 | #include <linux/reboot.h> | 44 | #include <linux/reboot.h> |
@@ -403,9 +404,12 @@ static unsigned int handle_diacr(struct vc_data *vc, unsigned int ch) | |||
403 | return d; | 404 | return d; |
404 | 405 | ||
405 | if (kbd->kbdmode == VC_UNICODE) | 406 | if (kbd->kbdmode == VC_UNICODE) |
406 | to_utf8(vc, conv_8bit_to_uni(d)); | 407 | to_utf8(vc, d); |
407 | else if (d < 0x100) | 408 | else { |
408 | put_queue(vc, d); | 409 | int c = conv_uni_to_8bit(d); |
410 | if (c != -1) | ||
411 | put_queue(vc, c); | ||
412 | } | ||
409 | 413 | ||
410 | return ch; | 414 | return ch; |
411 | } | 415 | } |
@@ -417,9 +421,12 @@ static void fn_enter(struct vc_data *vc) | |||
417 | { | 421 | { |
418 | if (diacr) { | 422 | if (diacr) { |
419 | if (kbd->kbdmode == VC_UNICODE) | 423 | if (kbd->kbdmode == VC_UNICODE) |
420 | to_utf8(vc, conv_8bit_to_uni(diacr)); | 424 | to_utf8(vc, diacr); |
421 | else if (diacr < 0x100) | 425 | else { |
422 | put_queue(vc, diacr); | 426 | int c = conv_uni_to_8bit(diacr); |
427 | if (c != -1) | ||
428 | put_queue(vc, c); | ||
429 | } | ||
423 | diacr = 0; | 430 | diacr = 0; |
424 | } | 431 | } |
425 | put_queue(vc, 13); | 432 | put_queue(vc, 13); |
@@ -627,9 +634,12 @@ static void k_unicode(struct vc_data *vc, unsigned int value, char up_flag) | |||
627 | return; | 634 | return; |
628 | } | 635 | } |
629 | if (kbd->kbdmode == VC_UNICODE) | 636 | if (kbd->kbdmode == VC_UNICODE) |
630 | to_utf8(vc, conv_8bit_to_uni(value)); | 637 | to_utf8(vc, value); |
631 | else if (value < 0x100) | 638 | else { |
632 | put_queue(vc, value); | 639 | int c = conv_uni_to_8bit(value); |
640 | if (c != -1) | ||
641 | put_queue(vc, c); | ||
642 | } | ||
633 | } | 643 | } |
634 | 644 | ||
635 | /* | 645 | /* |
@@ -646,7 +656,12 @@ static void k_deadunicode(struct vc_data *vc, unsigned int value, char up_flag) | |||
646 | 656 | ||
647 | static void k_self(struct vc_data *vc, unsigned char value, char up_flag) | 657 | static void k_self(struct vc_data *vc, unsigned char value, char up_flag) |
648 | { | 658 | { |
649 | k_unicode(vc, value, up_flag); | 659 | unsigned int uni; |
660 | if (kbd->kbdmode == VC_UNICODE) | ||
661 | uni = value; | ||
662 | else | ||
663 | uni = conv_8bit_to_uni(value); | ||
664 | k_unicode(vc, uni, up_flag); | ||
650 | } | 665 | } |
651 | 666 | ||
652 | static void k_dead2(struct vc_data *vc, unsigned char value, char up_flag) | 667 | static void k_dead2(struct vc_data *vc, unsigned char value, char up_flag) |