Linux: Plug-In Keyboard Focus Problem (Plugins Steal Keyboard Focus)

Hi,

I brought this up in IRC, but nobody could find a solution so I thought I would post it here.

For the first time, I have installed third party plugs in Renoise in my Linux machine.

The plugs work fine,but there is a problem with focus.

I play the notes from my QWERTY keyboard, and when I have the plug in in focuf (to adjust params), Renoise is obviously out of focus. The notes do not play.

I have to click back into the main Renoise window to be able to play the notes, which is highly annoying, as it means that I have to tweak, click, play, tweak, click, play, etc.

I can’t play the notes when I am adjusting the params in the plug in GUI, which makes everything very slow and cumbersome.

Any ideas?

Cheers

1 Like

Hey vadarfone,

This indeed is cumbersome, but unfortunately there is no “Enable Keyboard Focus” option for Linux. We simply didn’t managed to get this working on Linux so far.

On OSX this also does not always work with all plugins GUIs. What we do here with the focus is not part of the VST standard, so its kinda impossible to get this reliably working.

2 Likes

Hey Taktik,

Thanks for the speedy reply.

Yeah, this was the general consensus on IRC too.

It was suggested that a MIDI keyboard would be able to deal with this… Is that true?

We should take a look at xbindkeys to see if we can find something useful from there. Not an easy task anyway as this can open up can of worms with each different plugin.

I wish you find a solution to enable the keyboard inside Linux PlugIns. It’s really hard to create sounds on a notebook without this function and without an external midi-keyboard.

I’m just running into the same issue with Linux (Debian) and e.g. DIVA. Reaper and Ardour have a button with which keyboard focus can be switched on / off. Would it possible to implement this also in Renoise?

You should try to change “focus follow mouse” option in your WM.

My example: I use I3 WM and i have locked turned off focus follow mouse and focus is locked by default, with this settings, after i open VST i change focus back to renoise (clicking on it), and while vst window is upfront keyboard events are sent into renoise. I can change VST parameter with mousewheel and still play notes from qwerty keyboard.

off-topic, but focus follows mouse is a big quality of life improvement

edit: ah, I misread your message. I use bspwm and whenever I need to input text or whatever to a VST I just move the mouse or change focus with the kb

1 Like

hehe, i had a paragraph about normal case of focus follow mouse but deleted it accidently :wink:

1 Like

Now I’m confused. I use XFCE and I can only set it to these 2 options:

  1. Focus by mouse click and 2) Focus follows mouse arrow.
    None of them work. As soon as I tweak parameters the focus gets lost. Concerning i3 I’ll open up another thread the next days as I’m also interested in using it.

For your information im using i3 together with xfce ;). xfce panel and other de stuff and i3 as window management.

Focus follow mouse should work the way kytdkut described. With i3 difference is that vst i have configured as “floating window” and its shown in front, while renoise is maximized in background. With xfwm perhaps when you click on window it is bringed in front.

Do you mean focus follows mouse or mouse click? Both is not working for me. How can you adjust parameters in the VST with the mouse and at the same time use the keyboard for playing notes?

Yup, I have it installed with XFCE and tplayed a bit with it. I was not able to get the renoise window to full screen. Did you make the changes VI and VII as described here?

Yeah, i rememer seeing this manual. In i3 all apps should occupy fullscreen by default or split window if you have more than one window open.
If you have i3 running in xfce than changing settings in xfce settings wont work, you will need to edit .i3/config file. Simply add ther line: “focus_follows_mouse no”

In my case in full screen mode in i3 I still have the terminal frame around Renoise. I think I will stay XFCE, it also have some tiling features and I never need more than 2 windows next to each other. Or you convince me from the opposite. :blush:

Hehehe, if you dont need it then i dont see a point for you to use it. I like the ability to split windows realy fast because i always like to invoke terminal for some quick tasks like fixing sth on remote sever through ssh or checking downloaded files. In my workflow i3 is the best i could found, previously i was using awesome-wm. But i like i can connect it with xfce, because that way when someone (who is not used to tiling wm without anything on the screen) uses my computer, could easy find where is the browser ;).

Check if enabling focus follow mouse and puting windowed renoise next to vst will behave as kytdkut described. You should be able to change settings in vst and then just by moving mouse over to renoise play notes with keyboard.

1 Like

Window focus follows mouse position, without clicking. So if I want to use the keyboard to play notes I need to move the mouse cursor over Renoise.

We can’t focus a VST and send keyboard events to Renoise, got to work around it.

Problem is mostly gone with a midi keyboard though :yum:

edit: also set the windows focus delay when hovering mouse over a window to 0, otherwise switching focus won’t be instantaneous

1 Like

Ok, now I got it and that works of course. I have a LPK 25, but the keyboard is closer (I 'm lazy:stuck_out_tongue_closed_eyes: )

1 Like

Bumping this, as I’m using a small utility hack that might benefit someone else, too. It’s far from perfect… but if you’re like me, you might want to use it when the need arises.

There’s a little X window tool called xdotool which can be called from a terminal and it handles various window events. Where applicable, you can for example do an “apt install xdotool” if you don’t already have it on your system.

Long story short, when ever I edit a patch on Zebra and want to preview the sound on the qwerty keyboard while mousing the plugin controls, I open a terminal and go:

xdotool behave $(xdotool search --name zebra) mouse-enter windowactivate $(xdotool search --name renoise)

While this process is active in the terminal, it then keeps the main Renoise window focused at the same time I’m mousing the Zebra controls. I didn’t think it would work this well, but it really does (no flickering, no visible conflicting, just smooth). Your mileage may vary, of course, but it’s worth a shot – as it makes editing so much more enjoyable on a laptop.

In other words, after running this, Zebra receives qwerty triggered events from Renoise and the knobs on the GUI can be tweaked without constantly moving the cursor on the Renoise window to change focus back and forth.

As you experiment with this, you’ll soon find the caveats – for one, needing to ctrl-c out of this in the terminal and start it again when ever you spawn a new Zebra-or-anything window (the window id can change), and all that. However, when you know you are firing up some particular synth for a longer editing session, it’s not that much hassle to initiate, and makes it so much more pleasant :slightly_smiling_face:

Too bad that there is no real solution for this issue… no tweaking knobs on synths while triggering notes with the pc keyboard possible. Kinda forces the use of a midi keyboard.