Add selection list for Keyboard selection when on Linux in uinput#1815
Add selection list for Keyboard selection when on Linux in uinput#1815NijeboerFrank wants to merge 7 commits intoopensteno:mainfrom
Conversation
|
In my case, I would add |
|
Thanks a lot @NijeboerFrank for working on this! I now approved the GitHub actions run. Some tests will need the new parameter to be included. Regarding the GUI: It would be good to make it more clear that this option is Linux only. Adding this to the tooltip is probably not enough because most people don't read that. You could either add "Linux only" to the option name or, even better, only show this option on Linux. See |
|
Thanks for the tips @mkrnr! I'm trying to find some time this week to fix the tests and improve the GUI. |
|
I've a more fancy UI suggestion in #1187 (comment) (in my case it was for X implementation), but haven't found the time to properly integrate and upstream it. Having just a regex field works too (kind of). only for Linux uinput though. Having it silently do nothing might not be such a good idea. For the specific issue #1767: In principle, uinput shouldn't be used when X is available, but maybe depends on certain environment variables it may not be correctly selected. Relying on the user to manually provide a regex is certainly a hack instead of a proper fix. More proper fix would be
@mkrnr actually I don't think hiding the option is a particularly good idea, might be better to gray it out (with a tooltip explaining why it's disabled on hover). Otherwise there may be some users who check a screenshot online, see the feature, not seeing it in their local install, and get confused. |
|
@user202729 I was also thinking of something like that as well today. I could try to implement something like that to properly fix it, because I also think that the Regex version might be too hacky for non-technical users who run into this issue. I'm thinking of something like a dropdown if I can get it working. My initial reasoning for Regex was that if you leave the field empty it will just work as it did previously and it won't interfere with the current way that uinput works for the people that don't have similar issues as the one that I had. |
|
I changed the implementation to a list selection. Currently you can only select 1 keyboard from the list, because I also don't really see the usecase for selecting multiple as @user202729 mentioned in #118. So now if you have the "Keyboard" option selected, you can select which Keyboard will be captured with uinput. Let me know what you think, I'm happy to implement any feedback when I have the time. |
6272f65 to
9ae31b3
Compare
Changed the implementation of the keyboard selection when using Linux to a QComboBox. You can now select the keyboard you wish to use from a list in the UI. Also fixed the errors in the tests.
This environment variable was not passed with tox, meaning that it wasn't exposed to the environment in Python. Now it is, and now you can use it to determine x11 from Wayland.
ec37999 to
f21ce91
Compare
|
Actually, after thinking about it, a use case is if if you have multiple steno keyboards and may use one of them. Anyway, I think the current implementation breaks the oslayer abstraction layer. Not to mention #1742 . And in X, you "need" the keyboard capture object to get the list of keyboards. (up to @mkrnr what to do with it. On one hand there's the above, on the other hand there's the "the perfect is the enemy of the good" saying.) |
|
@user202729 do you mean that you think that the implementation in this PR breaks the So if there's anything in this PR that needs fixing, let me know. In the future I can also try to get multi-selection working so that people with multiple steno keyboards can use both and if there's need for such a feature. |
Summary of changes
Add a Regex field which can be used to filter some keyboards. This prevents e.g. the situation where a mouse with a Logitech Unifying receiver is incorrectly captured on Linux in Wayland (that was bothering me).
I currently don't have access to other operating systems, so this PR only works for the uinput keyboard capture.
I will try to add some tests later. I'm also not very familiar with qt, so all feedback is appreciated.
Closes #1767
Pull Request Checklist