-
Notifications
You must be signed in to change notification settings - Fork 244
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
Add option to keep keyboard focussed on the MIDI keyboard #181
base: master
Are you sure you want to change the base?
Add option to keep keyboard focussed on the MIDI keyboard #181
Conversation
…rd component. * Add toggle to parameters dialog for setting user preference for keyboard focus. * Add derived MIDI keyboard component with states for visibility and focus preference. * Add method to retain keyboard focus on the keyboard component when focus is lost.
…er MIDI keyboard focus toggle.
I've fixed the Linux build, but haven't had a chance to look at the macOS build yet! |
I have also fixed the macOS build by simply referencing the two new files I added in the project, but for some reason it shuffled around the project file, creating a huge diff! Please let me know if I should revert. |
@asb2m10 Any feedback? No rush! Just curious to hear your thoughts. |
Good implementation and it is a good idea. The only issue is that Dexed keeps the focus all the time, at least here on Linux. I cannot even rename a cartridge name. Can we check on what we have lost the focus ? So if it is a sub-component of Dexed, we keep it, but if it an top level window change, we give it... |
Sounds good! I'll implement the suggestion. |
…ttempt to take focus back if the component that took focus is also a Dexed component.
…ke focus back if focus was lost to parameters button.
I've found a way to check which component grabbed focus. Works well on Linux from my tests, but I still want to do a thorough check before updating the PR. Similar to how I'm checking if the parameters window took focus, I also want to see if the store dialog took focus, since I've noticed that also gets pushed to the back. Will make that change and then do some more testing across platforms when I have some time. Here is the updated method so far:
|
Merge upstream changes into fork.
…ke focus back if focus was lost to a component that should have focus.
I've updated the focusLost method to check if the keyboard lost focus to a Dexed component, and if it did, only keep focus if the component it lost focus to shouldn't have focus instead. Tested on Windows, Linux and macOS and it seems to be working well! |
Also it shouldn't steal the whole keyboard, but just keys used to operate the virtual MIDI keyboard, IMHO. For example, you should still be able to use arrows and Enter to move around in the browser. |
While browsing through patches and carts, I figured it would be very convenient for the computer keyboard to remain focussed on the on-screen MIDI keyboard component so that I could play notes as I clicked through patches. So I've added this functionality, as well as a toggle to configure it on and off. It was mostly for myself, but I figured that others might find it useful too!
Please let me know if you require any changes!