Note: Code above does not display the Scan Code of the last Character...just the PB KeyID value for a KeyPress
which does not take into account such things as CAPSLOCK_DOWN.
About the French keyboard problem, if you want a quick, temporary solution to try, remap the problem keys to keys you do not need.
There are tools you can download to remap keyboard Scan Codes or if you use Windows, just change the registry.
Run Regedit and navigate to:
Click on Edit->New->Binary Value and name it "Scancode Map" without the quotes.
ScanCode Map REG_BINARY 00,00,00,00,00,00,00,00,02,00,00,00,33,00,46,00,00,00,00,00
_____Example ___________ DATA ___________________ Fields
00,00,00,00,00,00,00,00,02,00,00,00,33,00,46,00,00,00,00,00 ; Comma Remapped to ScrollLock
00,00,00,00,00,00,00,00,02,00,00,00,32,00,44,00,00,00,00,00 ; Press F10 and software will see m
00,00,00,00,00,00,00,00,02,00,00,00,4D,00,5D,00,00,00,00,00 ; SHIFT_F10 becomes M
00,00,00,00,00,00,00,00,04,00,00,00,33,00,46,00,32,00,44,00,4D,00,5D,00,00,00,00,00; All three changes at once
_____________________________|_____________| One_________| Two________| Three
_____________________________Number of changes+1 in a single DATA field
This would be for all Users and of course applications using their own key mapping might overwrite so it gets complicated.