Skip to content

Commit

Permalink
Merge pull request PaulStoffregen#12 from alejho/master
Browse files Browse the repository at this point in the history
Italian keyboard layout
  • Loading branch information
PaulStoffregen authored Jan 21, 2018
2 parents f69f7a5 + 80beb1c commit ed93e3a
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
57 changes: 57 additions & 0 deletions PS2Keyboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,63 @@ const PROGMEM PS2Keymap_t PS2Keymap_Spanish = {
0, 0, 0, PS2_F7 }
};

const PROGMEM PS2Keymap_t PS2Keymap_Italian = {
// 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', PS2_o_GRAVE, 'p', '\'', 0,
0, 0, PS2_a_GRAVE, 0, PS2_e_GRAVE, PS2_i_GRAVE, 0, 0,
0 /*CapsLock*/, 0 /*Rshift*/, PS2_ENTER /*Enter*/, '+', 0, PS2_u_GRAVE, 0, 0,
0, '<', 0, 0, 0, 0, PS2_BACKSPACE, 0,
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,
0, 0 /*Lalt*/, 0 /*Lshift*/, 0, 0 /*Lctrl*/, 'Q', '!', 0,
0, 0, 'Z', 'S', 'A', 'W', '\"', 0,
0, 'C', 'X', 'D', 'E', '$', PS2_POUND_SIGN, 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', PS2_c_CEDILLA, 0, '?', 0,
0, 0, PS2_DEGREE_SIGN, 0, PS2_e_ACUTE, '^', 0, 0,
0 /*CapsLock*/, 0 /*Rshift*/, PS2_ENTER /*Enter*/, '*', 0, PS2_SECTION_SIGN, 0, 0,
0, '>', 0, 0, 0, 0, PS2_BACKSPACE, 0,
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 },
1,
// with altgr
{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, PS2_NOT_SIGN, 0,
0, 0 /*Lalt*/, 0 /*Lshift*/, 0, 0 /*Lctrl*/, 'q', PS2_SUPERSCRIPT_ONE, 0,
0, 0, 'z', 's', 'a', 'w', PS2_SUPERSCRIPT_TWO, 0,
0, 'c', 'x', 'd', PS2_EURO_SIGN, PS2_FRACTION_ONE_QUARTER, PS2_SUPERSCRIPT_THREE, 0,
0, ' ', 'v', 'f', 't', 'r', PS2_FRACTION_ONE_HALF, 0,
0, 'n', 'b', 'h', 'g', 'y', PS2_NOT_SIGN, 0,
0, 0, 'm', 'j', 'u', '{', '[', 0,
0, ',', 'k', 'i', 'o', '}', ']', 0,
0, '.', '-', 'l', '@', 'p', '\'', 0,
0, 0, '#', 0, '[', '~', 0, 0,
0 /*CapsLock*/, 0 /*Rshift*/, PS2_ENTER /*Enter*/, ']', 0, 0, 0, 0,
0, PS2_LEFT_DOUBLE_ANGLE_QUOTE, 0, 0, 0, 0, PS2_BACKSPACE, 0,
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 }
};


#define BREAK 0x01
Expand Down
1 change: 1 addition & 0 deletions PS2Keyboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ extern const PROGMEM PS2Keymap_t PS2Keymap_US;
extern const PROGMEM PS2Keymap_t PS2Keymap_German;
extern const PROGMEM PS2Keymap_t PS2Keymap_French;
extern const PROGMEM PS2Keymap_t PS2Keymap_Spanish;
extern const PROGMEM PS2Keymap_t PS2Keymap_Italian;


/**
Expand Down
1 change: 1 addition & 0 deletions examples/International/International.pde
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ void setup() {
//keyboard.begin(DataPin, IRQpin, PS2Keymap_US);
keyboard.begin(DataPin, IRQpin, PS2Keymap_German);
//keyboard.begin(DataPin, IRQpin, PS2Keymap_French);
//keyboard.begin(DataPin, IRQpin, PS2Keymap_Italian);
Serial.begin(9600);
Serial.println("International Keyboard Test:");
}
Expand Down

0 comments on commit ed93e3a

Please sign in to comment.