I have keys near arrows (originally they are Back and Next media keys ) remapped to PgUp/PgDown, but FreeRDP seems not to send them to remote side at all (at least a test WinForms application doesn't recieve any key events).
I'm experiencing the same: I've swapped Control and Caps Lock in my Gnome desktop (which presumably uses xmodmap for that under the hood). When I log into a Windows machine using rdesktop, the mappings are respected: the Caps Lock key acts as Control and vice versa. But when I log into the same machine using xfreerdp with all the same flags, the mappings are not respected: the Caps Lock key acts as Caps Lock.
The same problem has been discussed on the Freerdp-devel mailing list, though the authors apparently attribute it to keyboard-layout selection, which seems unrelated to me (there is no keyboard layout for these registry-hack swaps). Remmina is reported to be able to deal with this, though I couldn't build Remmina on my machine. :(
Fortunately FreeRDP doesn't read key input from /dev/console, so I've managed to solve my problem by modifying kernel scancode to keycode translation table via setkeycodes utility.
Thinking this is a bug even though kekekeks fixed his problem. As an example, it would make it easy to circumvent https://github.com/FreeRDP/FreeRDP/issues/811
@kekekeks could you tell me how to do the workaround with setkeycodes - I've spent way to long on this with no success.
I am voting for this issue. Please support sending local X keyboard customizations (by xmodmap) over RDP.
Dear googlers of the future: here's how I got my DasKeyboard to recognize a keymap over xfreerdp (I'm on Arch Linux).
Resources:
Steps I took for my machine (YMMV):
1) Figure out how to reference your keyboard in udev:
lsusb -> find your keyboardBus 001 Device 005: ID 04d9:2013 Holtek Semiconductor, Inc. Keyboard [Das Keyboard]
2) Figure out the correct keycode of the key you want to replace:
evtest if you don't already have itevtest, select the input you want to test (mine was 3)Event: time 1444849017.168133, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70039
Event: time 1444849017.168133, type 1 (EV_KEY), code 58 (KEY_CAPSLOCK), value 0
Event: time 1444849017.168133, -------------- SYN_REPORT ------------
Event: time 1444849017.872162, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70039
Event: time 1444849017.872162, type 1 (EV_KEY), code 58 (KEY_CAPSLOCK), value 1
Event: time 1444849019.152181, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e0
Event: time 1444849019.152181, type 1 (EV_KEY), code 29 (KEY_LEFTCTRL), value 1
Event: time 1444849019.152181, -------------- SYN_REPORT ------------
Event: time 1444849019.376152, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e0
Event: time 1444849019.376152, type 1 (EV_KEY), code 29 (KEY_LEFTCTRL), value 0
3) make a _new_ file in udev:
sudo vim /etc/udev/hwdb.d/90-caps-to-control.hwdbevdev:input:*v04D9p2013*
KEYBOARD_KEY_70039=leftctrl
4) Run the following commands:
sudo udevadm --debug hwdb --update
sudo udevadm trigger
sudo udevadm info /dev/input/by-path/*-usb-*-kbd | grep KEYBOARD_KEY
E: KEYBOARD_KEY_70039=leftctrl
You can further verify this by running evtest again and making sure that the changes have been made.
Event: time 1444849705.680741, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70039
Event: time 1444849705.680741, type 1 (EV_KEY), code 29 (KEY_LEFTCTRL), value 1
Here's how I got my Caps Lock to work as Control over FreeRDP:
edit FreeRDP-2.0.0-rc4/libfreerdp/locale/keyboard_xkbfile.c
find and edit the line with evdev 66 to say { "CAPS", RDP_SCANCODE_LCONTROL }, // evdev 66
Most helpful comment
Dear googlers of the future: here's how I got my DasKeyboard to recognize a keymap over xfreerdp (I'm on Arch Linux).
Resources:
Steps I took for my machine (YMMV):
1) Figure out how to reference your keyboard in udev:
lsusb-> find your keyboard2) Figure out the correct keycode of the key you want to replace:
evtestif you don't already have itevtest, select the input you want to test (mine was 3)3) make a _new_ file in udev:
sudo vim /etc/udev/hwdb.d/90-caps-to-control.hwdb4) Run the following commands:
You can further verify this by running
evtestagain and making sure that the changes have been made.