an adapter from any connected PS/2 keyboard to USB HID output
Embed:
(wiki syntax)
Show/hide line numbers
Keymaps.h
00001 #ifndef _KEYMAPS_H_ 00002 #define _KEYMAPS_H_ 00003 00004 #include "mbed.h" 00005 /** 00006 * Layout transition is usually handled by host OS 00007 * if not, a different layout can be forced here 00008 */ 00009 enum LAYOUTS { 00010 LO_US=1, 00011 LO_DE, 00012 LO_UK 00013 }; 00014 00015 class Keymaps 00016 { 00017 public: 00018 /** 00019 * Constructor 00020 * 00021 * 00022 * @param layout: Layout of PS/2 keyboard, for handling of additional/alternate keys 00023 * @param ext: keymap for keys with E0-prefixed PS/2-scancodes 00024 * 00025 */ 00026 Keymaps(LAYOUTS layout, bool ext); 00027 00028 /** 00029 * Array that references USB HID codes from PS/2 scancode suffix 00030 */ 00031 uint8_t K[255]; 00032 }; 00033 #endif
Generated on Fri Jul 15 2022 10:09:06 by
1.7.2