Re: [Bug #2074] AltGr+key not working in Linux Console (Spanish keyb)
- From: Pavel Roskin <proski gnu org>
- To: nobody savannah gnu org
- Cc: mc-devel gnome org, dmartina excite com
- Subject: Re: [Bug #2074] AltGr+key not working in Linux Console (Spanish keyb)
- Date: Fri, 27 Dec 2002 09:52:31 -0500 (EST)
Hi, David!
Let's see how replying to nobody savannah gnu org works.
> Summary: AltGr+key not working in Linux Console (Spanish keyb)
>
> Original Submission: In the Spanish keyboard I have an AltGr key which
> is used to form some esential characters:
>
> AltGr+º=\
> +1=|
> +2=@
> +3=#
Try this patch:
==========================
--- key.c
+++ key.c
@@ -465,9 +465,17 @@ correct_key_code (int code)
{
unsigned int c = code & ~KEY_M_MASK; /* code without modifier */
unsigned int mod = code & KEY_M_MASK; /* modifier */
+ unsigned int os_mod; /* modifier from the OS or X11 */
/* Add key modifiers directly from X11 or OS */
- mod |= get_modifier ();
+ os_mod = get_modifier ();
+
+ /* Remove modifier information from ordinary characters */
+ if (c >= 32 && c < 256) {
+ os_mod &= ~KEY_M_MASK;
+ }
+
+ mod |= os_mod;
/* This is needed if the newline is reported as carriage return */
if (c == '\r')
@@ -497,11 +505,6 @@ correct_key_code (int code)
mod |= KEY_M_CTRL;
}
- /* Remove Shift and Ctrl information from ordinary characters */
- if (c >= 32 && c < 256) {
- mod &= ~(KEY_M_SHIFT | KEY_M_CTRL);
- }
-
/* Convert Shift+Fn to F(n+10) */
if (c >= KEY_F (1) && c <= KEY_F (10) && (mod & KEY_M_SHIFT)) {
c += 10;
==========================
All modifiers on normal keys should be ignored unless the modifier comes
from the key table (as opposed to Linux ioctl and X11).
--
Regards,
Pavel Roskin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]