|
Post by GNU2Linux on May 27, 2024 7:21:12 GMT
I was very pleased to see that Bodhi developers had added a new feature to the Moksha desktop environment several months ago to allow a key combo to be bound to a single Super_L key press, with opening the Quick Launcher being the default. I was one of the people who asked for that feature. I used it for many years to quickly launch apps using only the keyboard on Windows and more recently on Linux Mint where it works identically by hitting the left Super a/k/a Windows key plus typing the first couple or few letters of an app name like f-i-r for Firefox for example and then hitting enter or the like.
The problem in Bodhi 7.0 now is that if you want to use the Super-L key alone like this to open Quick Launcher but you *also* want to use some common legacy key combos like Super_L plus E to open the default file manager Thunar or Super_L plus D to show the desktop is that there's a conflict between the key Super_L key press designed as a single key press and Super_L used in a key combo. Key combos like Super_L plus E or Super_L plus D would work intermittently or not work for me at all and other times if I hit Super_L + E for example, Thunar would open up but also the Quick Launcher would also awkwardly open up over top of it. It was very frustrating.
I found a solution recently on Stack Exchange that solves it and it's a command line program available in the repository called xcape. You can go to the terminal and remap the Super_L key to some unique key combo like say Control_L + Shift_L + Y and then go into the keybindings control center in Moksha and assign that unique combo Control_L + Shift_L + Y to open the Quick Launcher. The important part apparently is that one of the options in xcape allows the Super_L key to activate the remapped key to that unique key combo not on key press but on key release using a command like this in the terminal: xcape -e 'Super_L=Control_L|Shift_L|Y'. You also have to delete the default single Quick Launch keybinding for Super_L in the keybindings in Moksha. And finally set it up so that xcape command runs every time you login unles you want to manually retype that command in the terminal between sessions. Here's the relevant reference by some people who were trying to solve a similar clash in XFCE with Super_L single and combination keybindings and Whisker Menu.
Now the left Super key works as intended both singly to open the Quick Launcher and in combination with other keys to open specific apps I have assigned to it without conflict with each other. Hopefully this helps some other people who are keyboard shortcut oriented like myself.
|
|
|
Post by thewaiter on May 27, 2024 13:16:39 GMT
Hi Stefan here, the feature author. Of course I was aware of standalone Win key vs combo issues so I was trying to avoid this trouble during the coding. Let me introduce how this feature works. When you open the binding setting I added a new special option called "Single super key allowed". This option you need to check only in case you want to bind any event to a single Win key press. Keep in mind the event will happen after WIN key up stroke. In case you want a combination for example WIN + E or WIN + D, keep the option unselected. In combo situation the event will be activated after key down stroke. I mention the stroke only because there is no possibility to have a standalone WIN press as down stroke. I will cause the conflict. Anyway, I did many tests and the feature works as intended for me. No need to apply any extra solutions. ![](http://www.enlightenment.org/ss/e-665484b5d9bc71.85421016.png) Stefan
|
|
|
Post by GNU2Linux on May 27, 2024 21:31:27 GMT
Hi Stefan here, the feature author. Of course I was aware of standalone Win key vs combo issues so I was trying to avoid this trouble during the coding. Let me introduce how this feature works. When you open the binding setting I added a new special option called "Single super key allowed". This option you need to check only in case you want to bind any event to a single Win key press. Keep in mind the event will happen after WIN key up stroke. In case you want a combination for example WIN + E or WIN + D, keep the option unselected. In combo situation the event will be activated after key down stroke. I mention the stroke only because there is no possibility to have a standalone WIN press as down stroke. I will cause the conflict. Anyway, I did many tests and the feature works as intended for me. No need to apply any extra solutions. ![](http://www.enlightenment.org/ss/e-665484b5d9bc71.85421016.png) Stefan
Stefan, I appreciate the fast reply. Unfortunately the behavior you described does not work consistently for me even after unchecking Single Super Key allowed. It worked earlier for me and I was able to use the Super_L key to open the Quick Launcher and also use Super_L + E to open Thunar and Super_L+D to Show Desktop. I thought my problem was solved. But then after a while I took a break and went back to the computer and the key combos inexplicably stopped working. It has been like this over many sessions for weeks that I have tried to get it to work and it is simply not consistent. The key combos always break if you play with it long enough. I made a video to show you my screen and setup, perhaps I could send you a link if private messages are allowed or post here.
|
|
|
Post by GNU2Linux on May 27, 2024 22:24:19 GMT
Followup- I just had a breakthrough in realizing what is going on. It's Numlock that is breaking the single Super_L behavior and Super Key combos. When I first boot up my computer NumLock is off by default, that's why it starts out working as you intend. Super_L works as a single key to open the Quick Launcher and also in combos like Super + E or Super + D just fine.
However, as soon as I turn on NumLock it breaks both. Every computer keyboard on every computer I own, I make use of the keypad off on the right for many things including some key combos for pushing windows around. This always requires NumLock to be on by default. I imagine many other people, perhaps most other computer users also keep NumLock on by default or by choice. Perhaps you can check if this is the case on your end as well.
|
|
enigma9o7
Crew Member
![*](//storage.proboards.com/forum/images/stars/star_yellowgreen.png) ![*](//storage.proboards.com/forum/images/stars/star_yellowgreen.png)
Posts: 1,485
Likes: 1,370
|
Post by enigma9o7 on May 27, 2024 23:24:48 GMT
I have numlock turn on automatically by putting numlockx in the Moksha startup commands in ~/.e/e/applications/startup/startupcommands
|
|
|
Post by GNU2Linux on May 28, 2024 0:34:22 GMT
I have numlock turn on automatically by putting numlockx in the Moksha startup commands in ~/.e/e/applications/startup/startupcommands That's useful, thanks. Meanwhile, I take this to mean that NumLock is NOT interfering with the expected behavior on your computer, it's just causing a clash on mine? The solution I found works around the problem at least.
So I just add numlockx on a line in that otherwise empty startupcommands file?
And can I also simply add xcape -e 'Super_L=Control_L|Shift_L|Y' on another line to execute that on startup too?
So when opened in leafpad the contents of the startupcommands now looks like this:
numlockx xcape -e 'Super_L=Control_L|Shift_L|Y'
|
|
enigma9o7
Crew Member
![*](//storage.proboards.com/forum/images/stars/star_yellowgreen.png) ![*](//storage.proboards.com/forum/images/stars/star_yellowgreen.png)
Posts: 1,485
Likes: 1,370
|
Post by enigma9o7 on May 28, 2024 4:42:54 GMT
sure. of course numlockx has to be installed for it to do anything. you can test it from command line to make sure it turns on your numlock first if you want, but it works for me. and yeah you can put any commands you want to be executed in there. If running them from command line doesn't return a prompt, then put & at the end of them in startupcommands or the next command won't execute. (Doesn't matter for the last command).
|
|
|
Post by GNU2Linux on May 28, 2024 6:04:53 GMT
sure. of course numlockx has to be installed for it to do anything. you can test it from command line to make sure it turns on your numlock first if you want, but it works for me. and yeah you can put any commands you want to be executed in there. If running them from command line doesn't return a prompt, then put & at the end of them in startupcommands or the next command won't execute. (Doesn't matter for the last command). That was very helpful! I rebooted and the NumLock indicator light is now visible on the keyboard without manually pressing it for the first time and it works and also the key remapping I set up now works without manually typing it in the command line after start up. Now I have no more conflicts and all my keyboard shortcuts work without clashing with each other including both the single Super_L and Super_L combinations not stepping on each other like before.
|
|
|
Post by thewaiter on May 28, 2024 6:54:19 GMT
Great to hear
Do you really need that remap command (xcape -e 'Super_L=Control_L|Shift_L|Y') now?
Stefan
|
|
|
Post by GNU2Linux on May 28, 2024 18:23:04 GMT
Great to hear Do you really need that remap command (xcape -e 'Super_L=Control_L|Shift_L|Y') now? Stefan Yes, apparently so. I tried without it and I got those clashes every time NumLock was on. I could not get the Windows key alone to open the QuickLauncher and the Windows key in combo with other keys to do other things to work at the same time. Both only worked properly simultaneously when I turned NumLock off, which I do not want to do. Or, alternatively, if I remapped the Windows key press with xcape and used that other key combo to launch QuickLauncher to work around the problem.
|
|