Keyboard shortcuts are forced to QWERTY in password fields #4981
-
Describe the bug Steps To Reproduce
The correct behavior is displayed in the email address field. Expected behavior System Information
|
Beta Was this translation helpful? Give feedback.
Replies: 13 comments
-
The code uses wxTextCtrl fields with the wxTE_PASSWORD style flag set. On the Mac, wxWidgets uses Apple's Cocoa class NSSecureTextField for wxTextCtrl fields with the wxTE_PASSWORD style flag set. Since BOINC is using the MacOS native control for the password entry, I don't see how the keyboard layout could cause a problem, provided the keyboard layout has been properly selected in the MacOS keyboard system references. Also, if the keyboard layout caused the password entry to fail, then it would not work for many foreign language keyboards, and we have had no such reports. |
Beta Was this translation helpful? Give feedback.
-
@mhmdanas: I misunderstood your meaning. I thought you meant that the wrong text was pasted into the field. After trying it, I see that command-V does nothing at all with the different keyboard layout. However, if you press the command key and the key which would be V on a standard US keyboard (K on Dvorak), it does paste the text. @RichardHaselgrove: can you test this on an MS Windows computer to see if it has the same problem? |
Beta Was this translation helpful? Give feedback.
-
Will do. Does anyone have any suggestions for a keyboard layout that might re-direct or replace Ctrl-V? BTW, we have had consistent reports in Windows that the password field can't be filled in when attaching to a project, when the keyboard type is selected for a language that uses the Microsoft Pinyin keyboard handler. Could that be related? |
Beta Was this translation helpful? Give feedback.
-
Theoretically - yes. |
Beta Was this translation helpful? Give feedback.
-
OK, found a way to test at last. None of the Windows 10 tutorials matched my version, so I dropped back to Windows 7 and installed a Dvorak keyboard. Testing with a BOINC v7.20.2 Manager dated 18 Jul 2022, I can confirm: Pasting a password in the 'attach to project' dialog works if and only if you use the shortcuts for the current keyboard - Ctrl-V for Querty, Ctrl-> (on Querty hardware) for Dvorak. This is dynamic: you can change the current language while the page is open, and the shortcut setting changes too. That seems to be the opposite of the reported Mac behaviour. I'll try an Windows 11 machine, if I can find its keyboard installer. |
Beta Was this translation helpful? Give feedback.
-
Windows 11 is the same - shortcut matches selected language. Ctrl-V for Querty, Ctrl-> (on Querty hardware) for Dvorak layout. |
Beta Was this translation helpful? Give feedback.
-
Yes. I believe it is definitely a problem in the wxWidgets implementation for MacOS. I tested with the Select computer dialog, which specifically sets command-V as a keyboard shortcut (wxWidgets accelerator), and it still fails. I don't see any way for us to fix this on the BOINC side, but we could submit a bug report to wxWidgets. |
Beta Was this translation helpful? Give feedback.
-
I found the problem in wxWidgets. For "secure" text fields (used for password entry to echo dots rather than the password characters), lines 269-278 of wxWidgets/src/osx/cocoa/textctrl.mm has:
The So I don't see any easy way they could fix this for the Dvorak keyboard without breaking it for many other languages. |
Beta Was this translation helpful? Give feedback.
-
Workman does too; its V is in the same place as QWERTY B. |
Beta Was this translation helpful? Give feedback.
-
@mhmdanas I was only looking at the keyboard layouts offered by the Keyboard System Preferences on a standard MacOS 12.6 (Monterey) installation. Regardless, while I sympathize with your problem, I unfortunately see no way for BOINC to fix this without breaking our support for many times more users than the ones for whom it would help. |
Beta Was this translation helpful? Give feedback.
-
@mhmdanas I found a workaround for you, though this does not directly fix the keyboard issue. If you control-click (not command-click) on the password field you will get a contextual menu which allows you to paste into it from the clipboard. I confirmed that this works on Dvorak and I expect it will work regardless of keyboard layout. |
Beta Was this translation helpful? Give feedback.
-
Makes sense.
I don't care much frankly; it's not like I add a new project that often. While I would of course like to see this issue fixed while not breaking support for other Latin keyboard layouts, it doesn't bother me much personally.
Yeah, I figured that out myself too. Note that control-click on macOS is equivalent to right-click, so right-clicking on the password field will also show the contextual menu. |
Beta Was this translation helpful? Give feedback.
-
Since it's not smth that could be easily fixed on our side (to be completely honest, I don't think it should be fixed on our side at all), I'm converting this issue to Discussion to help other people who might have this issue as well. |
Beta Was this translation helpful? Give feedback.
@mhmdanas I found a workaround for you, though this does not directly fix the keyboard issue. If you control-click (not command-click) on the password field you will get a contextual menu which allows you to paste into it from the clipboard. I confirmed that this works on Dvorak and I expect it will work regardless of keyboard layout.