Skip to content

Commit 5fcdb95

Browse files
committed
Initial Release
Initial Release
1 parent 7a3a634 commit 5fcdb95

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed

README.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,77 @@
11
# PS2KeyMap
22
Arduino PS2 keyboard International Keyboard mapping from PS2KeyAdvanced and return as UTF-8
3+
4+
##This library requires PS2KeyAdvanced as well to work
5+
6+
First Public Release Version V1.0.2
7+
8+
Smaller footprint than any others found and more functionality.
9+
10+
###Platforms
11+
12+
Arduino AVR - tested on Uno and Mega 2560
13+
Arduino SAM - tested on DUE
14+
15+
###Test Environment
16+
17+
All platforms versions of test R3 Hardware
18+
Arduino V1.6.7
19+
DUE Board Manager package V1.6.6
20+
21+
##Important Hardware Notes
22+
23+
1 Make sure you have data and clock wires connected correctly. Clock wire MUST be connected to an interrupt pin.
24+
25+
- Do NOT use Pin 13 for either clock or data wires
26+
- PS2KeyRaw requires both pins specified for begin() as in keyboard.begin( data_pin, irq_pin );
27+
- Valid irq pins:
28+
- Arduino Uno: 2, 3
29+
- Arduino Due: All pins, except 13 (LED)
30+
- Arduino Mega: 2, 3, 18, 19, 20, 21
31+
- Teensy 2.0: All pins, except 13 (LED)
32+
- Teensy 2.0: 5, 6, 7, 8
33+
- Teensy 1.0: 0, 1, 2, 3, 4, 6, 7, 16
34+
- Teensy++ 2.0: 0, 1, 2, 3, 18, 19, 36, 37
35+
- Teensy++ 1.0: 0, 1, 2, 3, 18, 19, 36, 37
36+
- Sanguino: 2, 10, 11
37+
38+
2 When using DUE or other boards with 3V3 I/O you MUST use a level translator FET or IC like Texas Instruments TXS0102 or similar as most keyboards not only operate at 5V but the two wire communications are pulled up by a resistor to 5V at the keyboard end.
39+
40+
###Introduction
41+
42+
After looking round for suitable libraries I found most were lacking in functionality and high in code and data footprint, so I created a series of PS2 Keyboard libraries. This is the third which extends the second one PS2KeyAdvanced to support different Country keyboard mapping. More countries and special mappings can be added.
43+
44+
The size of the keyboard mappings is smaller than other libraries as some countries can be not used, and existing mappings are only the keys that are different from US layout, so only change data is stored (in Flash).
45+
46+
The library takes the 16 bit integer from PS2KeyAdvanced and converts to UTF-8/ASCII honouring SHIFT, CAPS and as long as NOT a functional key like F1 to F24 or Page Up, will convert to UTF-8 equivalent, otherwise same code is returned.
47+
48+
Current Country mappings included (other contributions welcomed)
49+
* US
50+
* UK/GB
51+
* DE - German
52+
* FR - French
53+
54+
You can select which map to use from your programme.
55+
56+
###Installation
57+
58+
Performed by standard zip file library inclusion into Arduino IDE
59+
60+
###Examples
61+
62+
This library has TWO examples, from simplest to most complec -
63+
64+
- Internationl that uses the serial port to output the converted codes received and allow changing of keyboard mapping on the fly.
65+
- KeyToLCD - Example that will allow you to display converted keyboard characters on LCD connected to Arduino and allow cursor movements to move the cursor on LCD, whilst also displaying strings for keys like ESC, TAB, F1 to F12
66+
67+
Note on LCDs and some terminal emulators not all characters may be supported.
68+
69+
##Euro Currency Symbol
70+
71+
As the Euro came about *AFTER* the standardisation of UTF-8, the Euro Symbol is a supported keycode but *NOT* a conversion to UTF-8. This is just not possible.
72+
73+
###Contributor and Author Details
74+
75+
Author Paul Carpenter, PC Services
76+
77+
Web Site http://www.pcserviceselectronics.co.uk

0 commit comments

Comments
 (0)