Commit Graph

156 Commits

Author SHA1 Message Date
Armin Novak
e5799ec947 [locale,xkbfile] improve mapping
* Add missing keycodes to mapping
* Use sorted list to create mapping table
2024-04-03 08:22:25 +02:00
akallabeth
d7ebec5a65 [tidy] move loop variable declaration to loop 2024-02-22 12:31:50 +01:00
akallabeth
0ba995655d [clang-tidy] cppcoreguidelines-init-variables 2024-02-15 11:49:16 +01:00
akallabeth
207def5c56 [clang-tidy] readability-isolate-declaration 2024-02-15 11:49:16 +01:00
Martin Fleisz
9cff6e9366 locale: Fix X11 keyboard layout detection
This fixes an issue with keyboard layout detection reintroduced in #8960

The problem has already been fixed in #6688 but got lost after
refactoring.

The issue is that the layout specifier might be a comma separated list
with country specifiers i.e. `"at,us"` which was not correctly handled.
2023-09-28 21:16:17 +02:00
Armin Novak
3ea38175b4 [locale,keyboard] fix keyboard mapping on apple 2023-08-31 11:39:22 +02:00
ehdgks0627
d04ba8d6ef Correct typos and formatting errors in format strings
In several files, fixed typos in format strings that were causing unexpected output and formatting issues.
2023-07-28 15:34:46 +02:00
Armin Novak
382ef13b1d [locale,xkb] cleaned up variant detection 2023-07-03 10:19:34 +02:00
Konrad Bucheli
d4e2129cd4 the default Swiss keyboard layout is German, French is a variant 2023-07-03 09:52:14 +02:00
Armin Novak
3e44efc841 [cmake] use FindX11 from CMake 3.13 2023-05-31 11:05:56 +02:00
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