PaulStoffregen / PS2Keyboard

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

Support for NodeMCU 0.9 (ESP-12 Module) / NodeMCU 1.0 (ESP-12E Module) modules. #9

Closed Estylos closed 7 years ago

Estylos commented 7 years ago

Hello !

PS2Keyboard now supports NodeMCU 0.9 (ESP-12 Module) / NodeMCU 1.0 (ESP-12E Module) modules!

By the way, I fixed a cash with these modules (see changes).

P.S. : PS2_EURO_SIGN doesn't work.

Sorry for my bad English, I'm French.

Have a good day! Sincerely.

PaulStoffregen commented 7 years ago

Did you compile this with warning enabled?

I believe the usage of keymap->uses_altgr is not correct with this change.

Estylos commented 7 years ago

I tested my code with a US keymap (no ALTGR) and a FR keymap (with ALTGR) and it worked perfectly! There is only a warning that says : missing initializer for member 'PS2Keymap_t::altgr'.

Right, after reflexion, I think that the best thing to do is to replace uint8_t with int. Of course, this is not very optimized but an int size on AVR is 16 bit (2 bytes), while on ESP it is 32 bit (4 bytes) unless you have another solution?