EscolarProgramming / NVDARemotePublic

Public repo for NVDARemote for iOS
8 stars 0 forks source link

Keyboard layout on remote machine doesn't match system. #14

Open pitermach opened 3 years ago

pitermach commented 3 years ago

I was connecting from both an M1 Mac and later an iPhone with a bluetooth keyboard. Both my phone and Mac, as well as the machine I was connecting to, had a US English layout set, however the pressed keys didn't match what got sent. Some examples: Pressing Z typed Y, pressing Y typed Z, pressing slash typed a dash, pressing the grave accent (appears to the left of 1 on a US keyboard) typed a backslash. There were many more keys that were typing the wrong characters, mainly various punctuation symbols.

EscolarProgramming commented 3 years ago

Thanks for your feedback, I thought, it was already solved. The problem is, I have only a German keyboard to test. I think, I'll add an option to change the keyboard layout, but I have to buy a keyboard for every keyboard layout I want to implement. I'll see what I can do.

tech10 commented 3 years ago

Is there a reason that a keyboard layout needs to be selected? Why not simply capture and send the keys pressed directly, in that whatever keyboard layout is being used on iOS, that one would also be sent to the server? Z and Y are always Z and Y, regardless of the keyboard layout set on iOS. If the physical arrangement of some keys is different because of the keyboard layout, can't iOS get that information and compensate for it, rather than a static assignment system, or however you've got it set up now?

In TeamViewer and other programs, I don't think you have to select a keyboard layout, and the keyboard layout is never a problem.

pitermach commented 3 years ago

You definitely don't need to buy multiple keyboards. The only real difference between various kinds of language keyboards is what keys are printed on them, and occasionally the shape and placement of some keys IE comparing US and International keyboards they have a differently sized and shaped enter key. Either way, the key codes sent to the system would be exactly the same, so even if you were to go out and buy a US keyboard, then while your phone is still in German layout type the key that has the "Z" printed on it, you'd still get a "Y" typed out because your system is still using the German Qwertz layout.

So, you can debug and test this much easier in software by changing the keyboard layout. If you go to Settings>General>Keyboard>Hardware Keyboard, you can add as many layouts as you need and change between language variants. If you already added multiple languages for the on-screen touch keyboard, then you should already see those languages added to the list of hardware layouts as well. Once you have multiple layouts configured here, pressing CTRL+Space will switch between them and VO will tell you what layout you're using.

EscolarProgramming commented 3 years ago

Sorry, you're right, I was thinking completely wrong. Of course, even if the keys are swapped, the key always sends the character that was just pressed, regardless of the layout. The point why I thought wrong was because I need to translate each key, from the iOS key layout (e.g. UIKeyboardHidUsage.KeyboardA) to the Windows key code (e.g. 65).

tsengwoody commented 2 years ago

I got same problem

I turn on NVDA help mode(NVDA+1) and test input key press -> NVDA got right ctrl -> right alt left windows -> left alt left alt -> left windows numpad1~9(numpad lock off) -> numLockNumpad1~9

I think this tool app is very helpful. I hope the author can continue to develop it.

c469591 commented 2 years ago

Hi, I'm from Taiwan's users, I think this app is great, but I met the same problem, I am in IOS used as remote, I input; Or \ or/and output to a remote computer buttons is wrong, In addition, cannot use the ESC key, seems to be affected by the IOS, We hope to repair, thanks!