diff options
| author | Richard M. Stallman | 1996-12-27 02:11:22 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-12-27 02:11:22 +0000 |
| commit | 695a5c4976de74c77793f71924dedb54175c4e5a (patch) | |
| tree | c4047ddd8a858187394a8b1770cfc91e0fd9bfbe /src | |
| parent | 441c2ae48373e06bb40ed98fe5057a94b43f5bdb (diff) | |
| download | emacs-695a5c4976de74c77793f71924dedb54175c4e5a.tar.gz emacs-695a5c4976de74c77793f71924dedb54175c4e5a.zip | |
(dos_set_keyboard): Test whether KEYB.COM is installed
for international keyboard support.
(dos_get_modifiers): If international keyboard support is NOT
required, make both Right and Left Alt key behave like Meta key.
Diffstat (limited to 'src')
| -rw-r--r-- | src/msdos.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/msdos.c b/src/msdos.c index 7629b9c7f81..0b4cc858e16 100644 --- a/src/msdos.c +++ b/src/msdos.c | |||
| @@ -1137,6 +1137,7 @@ static struct keyboard_layout_list | |||
| 1137 | 1137 | ||
| 1138 | static struct dos_keyboard_map *keyboard; | 1138 | static struct dos_keyboard_map *keyboard; |
| 1139 | static int keyboard_map_all; | 1139 | static int keyboard_map_all; |
| 1140 | static int international_keyboard; | ||
| 1140 | 1141 | ||
| 1141 | int | 1142 | int |
| 1142 | dos_set_keyboard (code, always) | 1143 | dos_set_keyboard (code, always) |
| @@ -1144,6 +1145,13 @@ dos_set_keyboard (code, always) | |||
| 1144 | int always; | 1145 | int always; |
| 1145 | { | 1146 | { |
| 1146 | int i; | 1147 | int i; |
| 1148 | union REGS regs; | ||
| 1149 | |||
| 1150 | /* See if Keyb.Com is installed (for international keyboard support). */ | ||
| 1151 | regs.x.ax = 0xad80; | ||
| 1152 | int86 (0x2f, ®s, ®s); | ||
| 1153 | if (regs.h.al == 0xff) | ||
| 1154 | international_keyboard = 1; | ||
| 1147 | 1155 | ||
| 1148 | /* Initialize to US settings, for countries that don't have their own. */ | 1156 | /* Initialize to US settings, for countries that don't have their own. */ |
| 1149 | keyboard = keyboard_layout_list[0].keyboard_map; | 1157 | keyboard = keyboard_layout_list[0].keyboard_map; |
| @@ -1451,6 +1459,13 @@ dos_get_modifiers (keymask) | |||
| 1451 | mask |= SUPER_P; | 1459 | mask |= SUPER_P; |
| 1452 | modifiers |= super_modifier; | 1460 | modifiers |= super_modifier; |
| 1453 | } | 1461 | } |
| 1462 | else if (!international_keyboard) | ||
| 1463 | { | ||
| 1464 | /* If Keyb.Com is NOT installed, let Right Alt behave | ||
| 1465 | like the Left Alt. */ | ||
| 1466 | mask &= ~ALT_GR_P; | ||
| 1467 | mask |= ALT_P; | ||
| 1468 | } | ||
| 1454 | } | 1469 | } |
| 1455 | 1470 | ||
| 1456 | if (regs.h.ah & 1) /* Left CTRL pressed ? */ | 1471 | if (regs.h.ah & 1) /* Left CTRL pressed ? */ |