Fix shortcut creation installer#10874
Conversation
See test results for failed build of commit b3bc3412d4 |
|
I have to say that from the end user perspective being able to set the shortcut right from the installer is a huge advantage - thanks for implementing this. I am however not sure that it would fix any of the above mentioned issues, as they are dealing with failures during creation of start menu shortcuts. @feerrenrut Have you seen This commend by @jcsteh ? Using the never shell interface which supports Unicode seems good way to go. |
|
Yep, I saw that comment. This PR uses the newer shell interface, using win32/shell rather than wshell. From my testing it handled setting shortcut names to unicode characters successfully. During my investigation I found a specification (on MSDN) for the *.lnk (windows shortcut file) format, which shows lots of limitations for what the hotkey can be set to. We will have to validate the gesture against this. We should probably also make this possible from the NVDA settings. There is another PR #10875 that I recommend we mitigate the issues in 2020.1 while this PR can target 2020.2 since it will need testing from a range of input locales. One question is what the default should be. The following file shows languages that have translated the hotkey, several of these are invalid and likely cause errors langs_with_customized_hotkey.txt Options that I can see for the default value for the shortcut:
Special casing those few languages adds more complexity, both to the code and to the documentation. There is trade off, though it's not the most important detail at this stage. |
|
@feerrenrut wrote:
That is IMHO not a good option. In Polish for instance this enters one of the national letters, and for less experienced uses changing this is impossible (I am still laughing when I recall my younger self uninstalling NVDA because of this)... It took a while to allow translators to translate the shortcut (see #2209)
From end user perspective this looks as the best option, though I understand why it might be hard to implement. |
|
I prefer ctrl+alt+f5 for all languages
|
With this PR the shortcut can be changed during the installer, this should make it much easier. Does this address your concern? |
This comment has been minimized.
This comment has been minimized.
|
@zstanecic We could consider changing the invariant (English language) default, but this will affect the largest group of users. It is the largest because many other languages haven't overridden the default. I'd prefer not to do this, but thank you for the suggestion. |
|
@feerrenrut
I am suggesting this, as it can affect a zillion of keyboard layouts we may not know of.. I.e. in the wild
|
|
@zstanecic I'm attempting to impact as few people as possible. My assumption is that most people don't want the hotkey that they are familiar with to suddenly change. Anyone who wishes to have a different hotkey can use this new option in the installer to get their preference. |
|
So, it’s great that this hotkey can be changed, but mention it in the user guide.
|
|
Just to add my two cents about CTRL+ALT+F5 and why I believe that this one is not really a good default
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
I'm closing this PR with a preference for an alternative solution. Getting the hotkey capture implementation right will take a significant amount of time and the user stories it enables can be satisfied in easier ways. Instead we will take the following approach: To support unicode characters in shortcut file names, which is specifically useful for the user guide and user config directory shortcuts.
To ensure mistakes during translation of hotkey don't affect the install process in the future.
To support users who don't like the default hotkey for their language.
|
Link to issue number:
fixes #5166
fixes #6326
Summary of the issue:
We currently allow translators to modify/translate the hotkey used to start NVDA, however hotkeys for windows shortcuts have several limitations and it is easy to get this wrong. Additionally, users may not be happy (or unable to use) the hotkey selected by the translator.
Description of how this pull request fixes the issue:
This PR is a (currently a proof of concept) to allow setting the hotkey from the installer GUI.
Documentation for the win32 shell link object:
https://docs.microsoft.com/en-gb/windows/win32/shell/shelllinkobject-object
Documentation for the LNK file format (windows shortcuts), particularly relevant is the section on hotkeys:
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-shllink/16cb4ca1-9339-4d0c-a68d-bf1d6cc0f943?redirectedfrom=MSDN
Testing performed:
Set the hot key to ctrl+alt+m, also set the hotkey with international keyboard.
This will require further testing by international users before merging.
Known issues with pull request:
ctrl+alt+n) if the shortcut file does not exist.Change log entry:
Section: New features, Changes, Bug fixes