-
-
Notifications
You must be signed in to change notification settings - Fork 626
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
Allow adding emulated system keyboard keys in the Input Gestures GUI #7784
Conversation
I notice that moving to "emulated system keyboard keys" and then tabbing does not show the "add" button. I have to hit down arrow once to get to my first emulated key, and then tabbing gets me to the "add" button. Thank you thank you for adding this. It's super-important for configuring braille displays without having to go into gestures.ini. |
I assume you are running this branch from source?
|
My fault. I thought the PR was incubating. Please ignore. I will run from source now and test further. |
@dan1982code did you end up testing this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really sure how to test this myself, so hopefully it gets a good workout while incubating.
@feerrenrut, thanks for incubating this. What do you think about the UX issues I outlined above? @dan1982code: Have you been able to do any tests while running from source? The pr is now incubating, so you should be able to test this from the next branch. |
I was running into a bug before (running from source) where Add wasn't active, but now I can add and Remove successfully. I'm testing with a Brailliant BI here -- a braille display is the key scenario for this PR, I think. So far so good, but I'll test more systematically today and report again. |
@dan1982code commented on 24 jan. 2018 15:03 CET:
Are you sure you were running from the correct branch? It should actually be quite impossible for the add button to be inactive on the emulated categories root. |
I was confident that I was using the right source branch, but now I don't know, because I've tried many times today, after computer/NVDA restart etc., and can't reproduce the add button not working. Sorry for the trouble -- all seems fine here now. |
This fails if you do the following:
|
Interesting catch there. This is because keyboardHandler.KeyboardInputGesture.fromName does not know about the NVDA key, which has been fixed as part of #7843. However, when applying that fix, I noticed some other bugs with KeyboardInputGesture.fromName.
I will commit a fix for that issue tomorrow. I will also write unit tests for the NVDA key as well as several edge cases KeyboardInputGesture.fromName should cover. Furthermore, we really want to have emulate scripts show up as NVDA+1, and definitely not 1+NVDA. |
Issues reported by @derekriemer need to be fixed before this is ready to go in master.
Interesting, so we'll need to prioritize modifiers. |
@derekriemer commented on 26 Jan 2018, 05:54 CET:
Somehow, yes. The current code just assumes that the last key in the sequence is the main key and the others are modifiers. |
…lized. * Fixed a bug where keyboardHandler.KeyboardInputGesture.getDisplayTextForIdentifier failed for an identifier that only contains modifiers (e.g. kb:alt).
I believe I made this fully python 3 ready now. Won't have the time to look into this any time soon, though. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@dingpengyu Please don't make comments like this, we are aware of this PR. The last comment from the author indicated remaining issues, which have not been resolved.
|
This pr is now pretty old and with the UX issues still there, I'm afraid it's getting nowhere without major refactoring, for which I don't have the time now. I'm tempted to close this, donating the code to whoever is interested to take this further. |
If you are happy for someone else to take this on. You can leave it open for now, I'll apply the abandoned label. |
Sure I am. This abandoned label is a nice addition.
|
cc: maybe @JulienCochuyt or @Andre9642 could be interested in working on this further? |
This pr now contains some pretty big conflicts in gui/settingsDialogs.py probably due to the merging of #10307. |
@michaelDCurran wrote:
Indeed, we kinda stepped on each other feet here. By the way, this led me to re-read my old code for PR #10307 and notice two errors I made that you'll hopefully help me fix by considering merge of the fix-up PR #11338. |
hello all |
@JulienCochuyt Yes, I'll take a look at this. |
Closing as superseded by #11402 |
Link to issue number:
Closes #6060.
Summary of the issue:
In the current situation, emulated system keyboard key scripts can only be added in gestures.ini or by updating a gesture map programmatically.
Description of how this pull request fixes the issue:
Allows adding custom emulated system keyboard keys from the input gestures gui, by selecting the category root tree view item and pressing add. An user will be able to enter a gesture to emulate, the entered gesture will be added to the tree view as a regular script and can be assigned as normal.
Testing performed:
Added and removed several gestures from the gui.
Known issues with pull request:
Some minor UX problems regarding adding and removing custom emulated keys:
These issues have to do with the fact that we can't reliably check from the input gestures dialog whether a custom emulation script is part of the user gesture map or another map. IN the latter case, removal should be unsupported. Thus, explicit removal of an emulated script is only possible when it has been added during that instance of the input gestures dialog.
Honestly, I think these are trivial issues, so I'm filing this pr to let initial review take place and discuss the limitations in the current implementation.
Change log entry: