Commit Graph

146 Commits

Author SHA1 Message Date
akallabeth
52786d0f12 [input] update to use new WINPR_KEYBOARD_TYPE*
* Use new enum constants with WINPR_KEYBOARD_* prefix
* Fix mapping of keycodes and scancodes, the offset of 8 is no longer
  required if the proper keyboard type is used.
2023-05-12 09:52:01 +02:00
Bernhard Miklautz
1504633522 refactor [locale/keyboard_x11]: cleanup and remove calls to xprop
* remove unused function freerdp_detect_keymap_from_xkb
* instead of querying the x keyboard rule properties
  (_XKB_RULES_NAMES_BACKUP and _XKB_RULES_NAMES) with xprop as external
	program use xlib directly
2023-05-11 11:07:22 +02:00
akallabeth
c0dc193a39 [winpr,input] use enum for keyboard types
* move type definition to WinPR as used there too.
* supported keyboard types are defined in
  [MS-RDPBCGR] 2.2.1.3.2 Client Core Data (TS_UD_CS_CORE)]
  use a enum instead of magic numbers to make code more readable.
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
7ab917dca8 Fixed Wsign-compare warnings 2022-12-09 15:58:26 +01:00
Armin Novak
4b9c8e6393 Updated keyboard list API 2022-10-19 20:31:53 +02:00
akallabeth
43c5289928 Replaced memset/ZeroMemory with initializer
* Addes WINPR_ASSERT on many occations
* Replaced memset with array initializer
* Replaced ZeroMemory with array initializer
2022-10-14 12:11:01 +02:00
Martin Fleisz
b2e6221241
locale: Fix polish keyboard layouts on MacOS (#8139) 2022-08-19 12:25:54 +02:00
Martin Fleisz
0c620815f3
locale: Use Polish Programmers as default keyboard layout (#8134) 2022-08-18 10:05:35 +02:00
akallabeth
159f24520c Fixed windows keyboard log message 2022-04-28 12:37:19 +02:00
akallabeth
962c5c3ef0 Fixed dead store warnings 2022-04-28 12:37:19 +02:00
akallabeth
6fd71fe737 Eliminate Dead nested assignment warnings 2022-04-28 12:37:19 +02:00
Armin Novak
4d03d7c0bf Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
Armin Novak
b2ad47a809 Reorganized FreeRDP headers 2022-03-03 11:26:48 +01:00
akallabeth
8cc6582044
Unify struct definitions (#7633)
* Unified enum/struct definitions, fixed include issues

* Fixed mac compilation issues

* Added missing include

* Fixed windows server build warnings

* Fixed VS2010 build issue

* Removed unnecessary library linking

* Fixed ThreadPool WinXP compatibility

* Fixed pr review remarks
2022-02-14 14:59:22 +01:00
Armin Novak
339cdded45 Fixed memory sanitizer warnings 2022-01-11 14:32:18 +01:00
akallabeth
7c9117cf86 Fixed size checks for locale detection.
Reported by George Zaytsev from Positive Technologies
2022-01-11 14:32:18 +01:00
akallabeth
70894c92e7 Added /kbd-scancode-list
Prints a listing of hexadecimal scancodes and the mapping to VK_*
2021-09-10 15:47:08 +02:00
Armin Novak
68f24477f6 Fixed compilation warnings on mac 2021-08-26 15:08:28 +02:00
Armin Novak
5afa592244 Fixed cast-qual warnings 2021-08-24 11:10:51 +02:00
Armin Novak
f515bd4560 Fixed shadowing and type errors 2021-08-24 10:45:57 +02:00
Armin Novak
610396e197 Fixed compilation warnings
Try to get the number of warnings down
2021-08-02 10:28:06 +02:00
akallabeth
8d82adb28a Fixed warnings 2021-06-17 10:35:22 +02:00
akallabeth
1dae0552d7 Fixed various warnings 2021-02-16 16:28:57 +01:00
Martin Fleisz
89347d85a1 Fix some incorrect keyboard mappings on Mac 2021-02-16 15:42:27 +01:00
Martin Fleisz
21158c0e8b
Merge pull request #6537 from akallabeth/kbd_remap
Added option to remap scancodes
2021-02-05 09:31:45 +01:00
Armin Novak
bc16472ad5 Added missing CoreFoundation library to dependencies 2021-01-21 09:51:30 +01:00
Martin Fleisz
68dfa353b8 locale: Fix keyboard detection on MacOS 2021-01-18 16:53:02 +01:00
Martin Fleisz
f2e082aa12 Fix parsing of current keyboard locale 2020-12-23 15:05:20 +01:00
akallabeth
8b8016ec21 Fixed call to GetKeyboardLayout 2020-12-15 11:29:51 +01:00
akallabeth
af81d9bb47 Fixed keyboard layout detection for windows 2020-12-11 13:14:08 +01:00
Armin Novak
d7bf6553c5 Added option to remap scancodes 2020-10-29 18:44:32 +01:00
Martin Fleisz
7ae8a158a0
Merge pull request #5707 from akallabeth/kbd_codepage
Added KeyboardCodePage option
2020-02-25 14:50:51 +01:00
Armin Novak
cc7027f799 Updated RDP_KEYBOARD_LAYOUT_TABLE
Regenerated with new fetch_language_identifiers.py, less manual
postprocessing required.
2020-02-24 12:44:15 +01:00
Armin Novak
30275e7ac3 Added keyboard language codepages and listing option 2020-02-21 11:57:36 +01:00
Armin Novak
7c243da6e1 Remove symbols exported by accident. 2019-12-02 10:57:31 +01:00
Armin Novak
72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
Armin Novak
f01e042211 Code cleanups (strlen, casts, size_t, ...) 2019-10-29 11:58:43 +01:00
Armin Novak
e3f3343323 Fixed #5496: Canadian keyboard mapping issue reported by @renaudn1981 2019-08-01 11:09:57 +02:00
Armin Novak
936ab9bb8b Fixed sign-compare warnings 2019-04-05 09:13:24 +02:00
Peter Åstrand (astrand)
9aced5945a Define scancodes for virtual keys, used by VNC servers
The list of fake keycodes can be found at:

https://cgit.freedesktop.org/xkeyboard-config/tree/keycodes/evdev#n290

This commit adds support for AltGr when xfreerdp is used in
TigerVNC/Xvnc and ThinLinc sessions.
2018-12-12 11:43:03 +01:00
Armin Novak
423d54d752 Fixed signedness casts. 2018-10-25 14:08:20 +02:00
Armin Novak
2a4b47aaac Changed size iterator variables to size_t 2018-10-24 13:24:25 +02:00
Armin Novak
a5f0fa818f Fixed freerdp_keyboard_layouts_free 2018-09-24 12:47:46 +02:00
akallabeth
668e347814
Merge pull request #4034 from blino/wayland-keymap
Reuse evdev/X11 keymap for wayland
2017-11-16 12:07:07 +01:00
Armin Novak
4eb5b8e349 Replaced atoi 2017-11-15 15:52:16 +01:00
Armin Novak
8b9e3fa51e Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02:00
Armin Novak
0490aeb018 Fixed clang malloc integer overflow warnings. 2017-07-20 09:29:48 +02:00
Olivier Blin
3e5f8c6bdb Reuse evdev/X11 keymap for wayland 2017-07-05 18:48:24 +02:00
Armin Novak
99c45405cb Fixed GetEnvironmentVariable. 2017-03-03 12:43:00 +01:00