Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Japanese JIS keymap. #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions PS2Keyboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,47 @@ const PROGMEM PS2Keymap_t PS2Keymap_UK = {
0
};

const PROGMEM PS2Keymap_t PS2Keymap_JP = {
// 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 /* HAN/ZEN */, 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 /*CapsLock*/, 0 /*Rshift*/, PS2_ENTER /*Enter*/, '[', 0, ']', '^', 0,
0, 0, 0, 0, 0, 0, PS2_BACKSPACE, 0,
0, '1', '\\', '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 /* HAN/ZEN */, 0,
0, 0 /*Lalt*/, 0 /*Lshift*/, 0, 0 /*Lctrl*/, 'Q', '!', 0,
0, 0, 'Z', 'S', 'A', 'W', '\"', 0,
0, 'C', 'X', 'D', 'E', '$', '#', 0,
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 /*CapsLock*/, 0 /*Rshift*/, PS2_ENTER /*Enter*/, '{', 0, '}', '~', 0,
0, 0, 0, 0, 0, 0, PS2_BACKSPACE, 0,
0, '1', '|', '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
};


#define BREAK 0x01
#define MODIFIER 0x02
#define SHIFT_L 0x04
Expand Down
1 change: 1 addition & 0 deletions PS2Keyboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ extern const PROGMEM PS2Keymap_t PS2Keymap_French;
extern const PROGMEM PS2Keymap_t PS2Keymap_Spanish;
extern const PROGMEM PS2Keymap_t PS2Keymap_Italian;
extern const PROGMEM PS2Keymap_t PS2Keymap_UK;
extern const PROGMEM PS2Keymap_t PS2Keymap_JP;


/**
Expand Down