| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: x68kKbd.c,v 1.8 2020/08/01 20:21:00 tsutsui Exp $ */ | | 1 | /* $NetBSD: x68kKbd.c,v 1.9 2020/11/01 11:44:55 tsutsui Exp $ */ |
2 | /*------------------------------------------------------------------------- | | 2 | /*------------------------------------------------------------------------- |
3 | * Copyright (c) 1996 Yasushi Yamasaki | | 3 | * Copyright (c) 1996 Yasushi Yamasaki |
4 | * All rights reserved. | | 4 | * All rights reserved. |
5 | * | | 5 | * |
6 | * Redistribution and use in source and binary forms, with or without | | 6 | * Redistribution and use in source and binary forms, with or without |
7 | * modification, are permitted provided that the following conditions | | 7 | * modification, are permitted provided that the following conditions |
8 | * are met: | | 8 | * are met: |
9 | * 1. Redistributions of source code must retain the above copyright | | 9 | * 1. Redistributions of source code must retain the above copyright |
10 | * notice, this list of conditions and the following disclaimer. | | 10 | * notice, this list of conditions and the following disclaimer. |
11 | * 2. Redistributions in binary form must reproduce the above copyright | | 11 | * 2. Redistributions in binary form must reproduce the above copyright |
12 | * notice, this list of conditions and the following disclaimer in the | | 12 | * notice, this list of conditions and the following disclaimer in the |
13 | * documentation and/or other materials provided with the distribution. | | 13 | * documentation and/or other materials provided with the distribution. |
14 | * | | 14 | * |
| @@ -175,30 +175,28 @@ x68kKbdProc(DeviceIntPtr pDev, /* Keyboa | | | @@ -175,30 +175,28 @@ x68kKbdProc(DeviceIntPtr pDev, /* Keyboa |
175 | * returns: nothing | | 175 | * returns: nothing |
176 | *-----------------------------------------------------------------------*/ | | 176 | *-----------------------------------------------------------------------*/ |
177 | static void | | 177 | static void |
178 | x68kInitModMap(KeySymsRec *KeySyms, CARD8 *x68kModMap) | | 178 | x68kInitModMap(KeySymsRec *KeySyms, CARD8 *x68kModMap) |
179 | { | | 179 | { |
180 | int i; | | 180 | int i; |
181 | | | 181 | |
182 | for (i = 0; i < MAP_LENGTH; i++) | | 182 | for (i = 0; i < MAP_LENGTH; i++) |
183 | x68kModMap[i] = NoSymbol; | | 183 | x68kModMap[i] = NoSymbol; |
184 | if (KeySyms->minKeyCode < MIN_KEYCODE) { | | 184 | if (KeySyms->minKeyCode < MIN_KEYCODE) { |
185 | KeySyms->minKeyCode += MIN_KEYCODE; | | 185 | KeySyms->minKeyCode += MIN_KEYCODE; |
186 | KeySyms->maxKeyCode += MIN_KEYCODE; | | 186 | KeySyms->maxKeyCode += MIN_KEYCODE; |
187 | } | | 187 | } |
188 | #if 0 | | | |
189 | if (KeySyms->maxKeyCode > MAX_KEYCODE) | | 188 | if (KeySyms->maxKeyCode > MAX_KEYCODE) |
190 | KeySyms->maxKeyCode += MAX_KEYCODE; | | 189 | KeySyms->maxKeyCode = MAX_KEYCODE; |
191 | #endif | | | |
192 | for (i = KeySyms->minKeyCode; | | 190 | for (i = KeySyms->minKeyCode; |
193 | i < KeySyms->maxKeyCode; i++) { | | 191 | i < KeySyms->maxKeyCode; i++) { |
194 | switch (KeySyms->map[(i-KeySyms->minKeyCode)*4]) { | | 192 | switch (KeySyms->map[(i-KeySyms->minKeyCode)*4]) { |
195 | case XK_Shift_L: | | 193 | case XK_Shift_L: |
196 | case XK_Shift_R: | | 194 | case XK_Shift_R: |
197 | x68kModMap[i] = ShiftMask; | | 195 | x68kModMap[i] = ShiftMask; |
198 | break; | | 196 | break; |
199 | case XK_Control_L: | | 197 | case XK_Control_L: |
200 | case XK_Control_R: | | 198 | case XK_Control_R: |
201 | x68kModMap[i] = ControlMask; | | 199 | x68kModMap[i] = ControlMask; |
202 | break; | | 200 | break; |
203 | case XK_Alt_L: | | 201 | case XK_Alt_L: |
204 | case XK_Alt_R: | | 202 | case XK_Alt_R: |