PaulStoffregen / PS2Keyboard

PS/2 Keyboard Library for Arduino
http://www.pjrc.com/teensy/td_libs_PS2Keyboard.html
147 stars 57 forks source link

Support for UK (logitech) keyboard #15

Closed drp0 closed 6 years ago

drp0 commented 6 years ago

Minor changes to US map to work with a uk keyboard:

const PROGMEM PS2Keymap_t PS2Keymap_US = { // without shift {0, PS2_F9, 0, PS2_F5, PS2_F3, PS2_F1, PS2_F2, PS2_F12, 0, PS2_F10, PS2_F8, PS2_F6, PS2_F4, PS2_TAB, '`', 0, 0, 0 /Lalt/, 0 /Lshift/, 0, 0 /Lctrl/, 'q', '1', 0, 0, 0, 'z', 's', 'a', 'w', '2', 0, 0, 'c', 'x', 'd', 'e', '4', '3', 0, 0, ' ', 'v', 'f', 't', 'r', '5', 0, 0, 'n', 'b', 'h', 'g', 'y', '6', 0, 0, 0, 'm', 'j', 'u', '7', '8', 0, 0, ',', 'k', 'i', 'o', '0', '9', 0, 0, '.', '/', 'l', ';', 'p', '-', 0, 0, 0, '\'', 0, '[', '=', 0, 0, 0 /CapsLock/, 0 /Rshift/, PS2_ENTER /Enter/, ']', 0, '#', 0, 0, //drp \ to # 0, '\', 0, 0, 0, 0, PS2_BACKSPACE, 0, //drp \ added 0, '1', 0, '4', '7', 0, 0, 0, '0', '.', '2', '5', '6', '8', PS2_ESC, 0 /NumLock/, PS2_F11, '+', '3', '-', '', '9', PS2_SCROLL, 0, 0, 0, 0, PS2_F7 }, // with shift {0, PS2_F9, 0, PS2_F5, PS2_F3, PS2_F1, PS2_F2, PS2_F12, 0, PS2_F10, PS2_F8, PS2_F6, PS2_F4, PS2_TAB, '¬', 0, //drp ~ to ¬ 0, 0 /Lalt/, 0 /Lshift/, 0, 0 /Lctrl/, 'Q', '!', 0, 0, 0, 'Z', 'S', 'A', 'W', '"', 0, //drp @ to " 0, 'C', 'X', 'D', 'E', '$', '£', 0, //drp # to £ 0, ' ', 'V', 'F', 'T', 'R', '%', 0, 0, 'N', 'B', 'H', 'G', 'Y', '^', 0, 0, 0, 'M', 'J', 'U', '&', '', 0, 0, '<', 'K', 'I', 'O', ')', '(', 0, 0, '>', '?', 'L', ':', 'P', '_', 0, 0, 0, '@', 0, '{', '+', 0, 0, //drp " to @ 0 /CapsLock/, 0 /Rshift/, PS2_ENTER /Enter/, '}', 0, '~', 0, 0, //drp | to ~ 0, '|', 0, 0, 0, 0, PS2_BACKSPACE, 0, //drp | added 0, '1', 0, '4', '7', 0, 0, 0, '0', '.', '2', '5', '6', '8', PS2_ESC, 0 /NumLock/, PS2_F11, '+', '3', '-', '*', '9', PS2_SCROLL, 0, 0, 0, 0, PS2_F7 }, 0 };

PaulStoffregen commented 6 years ago

I tried to add it. Hopefully this will work? https://github.com/PaulStoffregen/PS2Keyboard/commit/f95e4a58aabadc4076e42af20e4180f20450c718