MCPcopy Create free account
hub / github.com/OpenDUNE/OpenDUNE / Input_Keyboard_Translate

Function Input_Keyboard_Translate

src/input/input.c:158–171  ·  view source on GitHub ↗

* Translate keyboard input. * @param keyValue Entered key value. * @return Translated key value. */

Source from the content-addressed store, hash-verified

156 * @return Translated key value.
157 */
158static uint16 Input_Keyboard_Translate(uint16 keyValue)
159{
160 uint16 i;
161
162 if ((g_inputFlags & INPUT_FLAG_NO_TRANSLATE) != 0) return keyValue;
163
164 for (i = 0; i < lengthof(s_translateMap); i++) {
165 if (s_translateMap[i] != (uint8)(keyValue & 0xFF)) continue;
166
167 return s_translateTo[i] | (keyValue & 0xFF00);
168 }
169
170 return keyValue;
171}
172
173/* Receive the keyboard scancodes from the AT keyboard */
174void Input_EventHandler(uint8 key)

Callers 2

Input_EventHandlerFunction · 0.85
Input_TestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected