Commit Graph

20 Commits

Author SHA1 Message Date
akallabeth
d2cf953f24 [winpr,input] properly define keyboard types
* use an enum to define the different WINPR_KEYBOARD_TYPE*
* use the enum as argument for the functions instead of DWORD
2023-05-12 09:52:01 +02:00
David Fort
46171045ed [winpr,input] fix GetKeycodeFromVirtualKeyCode(code, KEYCODE_TYPE_XKB)
As KEYCODE_TYPE_XKB is 3, in the previous code we were doing some "and masking"
and so when calling GetKeycodeFromVirtualKeyCode(code, KEYCODE_TYPE_XKB), the
function was always interpreting the virtual key code with the apple layout.
This patch fixes that and also mutualize the search in the code array.
2023-05-12 09:52:01 +02:00
akallabeth
1318b813d6 [winpr,input] fix apple keyboard mapping
GetVirtualKeyCodeFromKeycode and GetVirtualKeyCodeFromKeycode used
an invalid index offset. this commit corrects that, but is API breaking.
2023-04-21 12:31:51 +02:00
Pascal Nowack
bb967d1533 winpr/input: Add actual evdev keyboard handling
WinPR provides APIs to convert between keycodes between virtual
keycodes.
These keycodes can currently be evdev keycodes or Apple keycodes.
The evdev handling, however, handles XKB keycodes and not evdev ones.
The main difference between these is that XKB keycodes are shifted by
the value 8, compared to evdev keycodes.

In order to fix this situation, rename the evdev keycodes to XKB ones,
and introduce additionally a new keycode evdev, including its handling
for this keycode type.
2023-04-21 12:31:51 +02:00
akallabeth
752ac3b479
Fix #7793: Do not expose internal input API (#7794)
* Fixed GetFileInformationByHandle initializers

* Fix #7793: Do not expose internal input API

Slow-Path input uses UINT16 for scancodes on wire, but only the
lower byte is actually used. (the extended fields are sent in
keyboardFlags field)
Hide this implementation detail and adjust the API to use UINT8
for the code instead just like the corresponding Fast-Path PDU

* Added a warning for problematic slow path keyCodes
2022-04-13 09:34:05 +02:00
Armin Novak
6ed50b4b1d Refactored WinPR includes 2022-03-03 11:26:48 +01:00
Armin Novak
610396e197 Fixed compilation warnings
Try to get the number of warnings down
2021-08-02 10:28:06 +02:00
Armin Novak
72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
Jura Sasek
a84c5cbfb9 Sun keyboard 2017-08-04 13:09:32 +02:00
Norbert Federa
92aa21c45b Several fixes for keyboard type 7 (japanese) 2016-02-11 21:40:50 +01:00
Marc-André Moreau
22260600fa libwinpr-input: add missing VK_DECIMAL mapping of OS X keycode mapping of ABNT2 keyboard 2014-11-11 12:39:41 -05:00
Daryl Poe
9897f72b97 add additional evdev key mappings for multimedia and Korean keyboards 2014-01-14 15:18:20 -07:00
Marc-André Moreau
fdae43aafc mfreerdp: fix keyboard mapping for toggle keys 2013-10-07 16:43:23 -04:00
Marc-André Moreau
9bf924929c xfreerdp-server: use libwinpr-input for keyboard mapping 2013-05-02 01:34:54 -04:00
Christian Hofstaedtler
b8d0e03a53 add KBDEXT to KEYCODE_TO_VKCODE_APPLE where needed 2013-03-11 23:23:20 +01:00
Marc-André Moreau
1630b80bda libwinpr-input: added more japanese definitions 2013-03-04 21:27:56 -05:00
Marc-André Moreau
6c40fde892 libwinpr-input: map most evdev keycodes 2013-03-04 20:37:44 -05:00
Marc-André Moreau
d4dc6b256e libwinpr-input: prepare comments for evdev keycode map 2013-03-04 18:27:31 -05:00
Marc-André Moreau
0bff72935b libwinpr-input: add empty keycode map for evdev 2013-03-04 17:19:33 -05:00
Marc-André Moreau
7d75343e8e libfreerdp-locale: cleanup Mac OS X keycode mapping 2013-03-03 19:30:01 -05:00