From 5978bcc19612edd479cebd1dcee07faa753aa691 Mon Sep 17 00:00:00 2001 From: Pavel Tsekov Date: Mon, 18 Sep 2006 21:06:58 +0000 Subject: [PATCH] * src/key.c (get_key_code): Do not blindly strip the eight bit of the key code when the 'use_8th_bit_as_meta' flag is set. Only key codes in the range 128 - 255 should be stripped, the rest must be left intact. --- src/ChangeLog | 7 +++++++ src/key.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 624c62db0..c9a84e2f8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2006-09-18 Pavel Tsekov + + * key.c (get_key_code): Do not blindly strip the eight bit of the + key code when the 'use_8th_bit_as_meta' flag is set. Only key codes + in the range 128 - 255 should be stripped, the rest must be left + intact. + 2006-09-14 Pavel Tsekov * wtools.c (fg_input_dialog_help) [ENABLE_NLS]: Translate the diff --git a/src/key.c b/src/key.c index e3e8d3237..feed1fca2 100644 --- a/src/key.c +++ b/src/key.c @@ -803,7 +803,7 @@ int get_key_code (int no_delay) d = ALT(*pending_keys++); goto check_pend; } - if ((d & 0x80) && use_8th_bit_as_meta) + if ((d > 127 && d < 256) && use_8th_bit_as_meta) d = ALT(d & 0x7f); this = NULL; return correct_key_code (d); @@ -862,7 +862,7 @@ int get_key_code (int no_delay) this = keys; parent = NULL; - if ((c & 0x80) && use_8th_bit_as_meta) { + if ((c > 127 && c < 256) && use_8th_bit_as_meta) { c &= 0x7f; /* The first sequence defined starts with esc */