techpaul / PS2KeyAdvanced

Arduino PS2 Keyboard FULL keyboard protocol support and full keys to integer coding
GNU Lesser General Public License v2.1
140 stars 27 forks source link

` and ~ keys and Keyboard . does not work #24

Closed shift838 closed 3 years ago

shift838 commented 3 years ago

The "." on the keyboard only works as a 'DELETE' key whether Numlock is on or off.

Also what is the keywords for use for the ` and the ~ key ?

I can get the "." to work on the Keyboard if I add:

translationTable[PS2_KEY_KP_DOT]=0x34;

But that is not the keycode for the Keyboard "." key. I believe it is 0x53, but that does not work either.

techpaul commented 3 years ago

I think you have a misunderstanding of what codes are reurned and how the library works.

Many many questions, as these work correctly for years on keyboards I and other uders have used, this sort of problem would have been reported years ago.

Questions

  1. What board are you using?
  2. What nationality keyboard do you have?
  3. What is SCROLL LOCK doing Scroll Lock overrides Num Lock on the numeric keypad
  4. What do you MEAN by cannot get to work the code that SHOULD be returned is NOT the same as the main keyboard area DOT ket (PS2_KEY_DOT) that is to distinguish the keys. Just like keys 0-9 and Numeric Keypad 0-9 return DIFFERENT codes.
  5. You do realise the Keycode for a key returned from the keyboard has many codes
    • Scan code sequence for make and brealk and dependant on other modes
    • PS2KeyAdvanced Keycode that defines the actual key
    • ASCII/UTF-8 code for common string/char representation for normal strings that more than one key could produce

If you want translation to ASCII or UTF-8 you NEED PS2KeyMap library AS WELL!!! This is standard Arduino IDE download from Library Manager.

To convert all keys on ANY language keyboard to ASCII/UTF-8 requires translation and mapping using PS2KeyMap