-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Partially unexpected key mapping in secondary wlroots WM #3050
Comments
Welcome back @CaptainBloodz. Interesting problem. The way this currently works is that xorgxrdp translates the RDP scancodes into "base" X11 keycodes. These are then mapped to keysyms using the normal X11 mechanisms. xorgxrdp needs to be told what the XKB model and layout are for this to work properly. This bit may be going wrong. What do you get for the following commands?
|
I have the same problem with Rocky Linux 9.4. The OS is running inside HyperV and I connected using mstsc. If I connect with HyperV console the keyboard works.
The down arrow gives ENTER I have the same weird key codes as the previous user:
The above log is for the arrow keys and Insert.
Inside the RDP
Inside the console:
|
@piovisqui - can you confirm you're using the VNC backend (since you're on Rocky)? Thanks. |
Do you mean what's configured in SessionType?
|
Sorry - fat fingers. Yes, that's fine. At the moment, I don't think your issue is not the same as the OP's issue - @CaptainBloodz is using a development version of xrdp and also isn't using VNC. I could be wrong though, so let's dig down a little. Since you're using VNC, this may be fixable by generating (or regenerating) your key mapping file. Can you tell me what you get for this command :-
I'm pretty sure from what you've said that the keymap code you should be trying to load is 00000416 for Brazilian Portuguese, but maybe something else is going on here. |
The log:
I have tried without success:
|
The problem is (I think) the missing keymap file. Here's some background info. This is a complicated area. Please tell me if I'm not explaining it well. The magic number Current versions of XRDP translate incoming RDP scancodes into X11 keycodes using a private table. For a VNC server we then need to generate a VNC key event which requires an X11 KeySym. This conversion is done by looking up the keycode in one of the shift state tables in Interestingly this file doesn't seem to be part of the standard RPM. This makes me a bit nervous as the origins and nature of this file are unknown. Could you give us the results of these commands so we can see exactly what we're dealing with?
Thanks. |
Yes, the keyboard is ABNT2. Here:
I've copied the km-00000416.ini into km-00010416.ini and it still did not work. |
Thanks. Try this to regenerate the file completely using the current X server. We've established that the two X servers we're discussing are broadly compatible.
This might seem a bit pointless, but it isn't. There's an implicit assumption that the same X11 keycodes are used by the keymap generator and the runtime X server - this isn't always the case. I'm working on a way to remove this assumption, but in the meantime we have to work with what we've got. |
I generated the file: Still not fully working. This sequence is 0,1,2...9 using the num lock numbers:
|
It may not seem like it, but that's progress. I'm sorry this is taking a bit longer than either of us would like. The keyboard mappings haven't been touched for a fair while and they're starting to show it. The good news is this is an area I'm currently trying to improve at present - this level of file hackery should not be necessary. Let's sort the keypad out. The reason the keypad isn't working is down to a change in the XKB sub-system which is in your version of CentOS. My notes of it are here if you're interested. I think you can reasonably address this by
Here's an example; you can see from your last response that keypad 0 is Please come back to me and let me know how it goes. I'm about to sign off for the day but I should have time to address your reply tomorrow. |
I'm glad we've got the keypad sorted out. As regards the rest of your comment:-
|
It's not the default HyperV console, however if you mark "Enhanced session" it does use xrdp. If I do "systemctl stop xrdp" the console crashes. |
OK - thanks for that. It's a feature I knew nothing about. Is there anything outstanding on the Rocky keyboard? |
No more responses - closing. See also #3138 which is now merged. |
xrdp version
0.10.80
Detailed xrdp version, build options
Operating system & version
PRETTY_NAME="Gentoo Linux"
Installation method
other
Which backend do you use?
xorgxrdp
What desktop environment do you use?
lxde/openbox
Environment xrdp running on
skylake iGP
What's your client?
remmina
Area(s) with issue?
Other
Steps to reproduce
Using xev while running any secondary wlroots WM (sway,labwc,hyprland) with with pc104 defined keyboard.
✔️ Expected Behavior
Proper key mapping
❌ Actual Behavior
Most keys between alpha block and numpad block have unexpected values as listed below:
up arrow:
detected:
keycode 98 (keysym 0xff26, Katakana)
expected:
keycode 98 (keysym 0xff52, Up)
left arrow:
detected:
keycode 100 (keysym 0xff23, Henkan_Mode)
expected:
keycode 100 (keysym 0xff51, Left)
right arrow:
detected:
keycode 102 (keysym 0xff22, Muhenkan)
expected:
keycode 102 (keysym 0xff53, Right)
down arrow:
detected:
keycode 104 (keysym 0xff8d, KP_Enter)
expected:
keycode 104 (keysym 0xff54, Down)
insert
detected:
keycode 106 (keysym 0xffaf, KP_Divide)
expected:
keycode 106 (keysym 0xff63, Insert)
del
detected:
Can't capture, add light to the screen
expected:
state 0x10, keycode 107 (keysym 0xffff, Delete)
pgdown
detected:
keycode 105 (keysym 0xffe4, Control_R)
expected:
keycode 105 (keysym 0xff56, Next)
pgup
detected:
keycode 99 (keysym 0xff25, Hiragana)
expected:
keycode 99 (keysym 0xff55, Prior)
home
detected:
keycode 97 (keysym 0x0, NoSymbol)
expected:
keycode 97 (keysym 0xff50, Home)
end
detected:
keycode 103 (keysym 0x0, NoSymbol)
expected:
keycode 103 (keysym 0xff57, End)
printscreen/sysreq
detected:
keycode 111 (keysym 0xff52, Up)
expected:
keycode 111 (keysym 0xff61, Print)
scrolllock
detected:
keycode 78 (keysym 0xff14, Scroll_Lock)
expected:
keycode 78 (keysym 0xff14, Scroll_Lock)
pause/break
detected:
keycode 110 (keysym 0xff50, Home) in repeated mode
expected:
keycode 110 (keysym 0xff6b, Break)
Anything else?
Reported faulty keys are working fine in xrdp/x11 primary WM.
Working fine too when running wlroot WM as primary, i.e. no xrdp.
The text was updated successfully, but these errors were encountered: