📜 ⬆️ ⬇️

ksuperkey - open the KDE Kickoff menu using the Win key (Super) button in Ubuntu, Kubuntu and other versions of Linux

After switching from Windows to Linux and KDE, many users experience severe torment and dizziness due to the inability to customize the opening of the KDE Kickoff launch menu using the familiar Win button on the keyboard. I was among such users, not so much because of the habit, but more because the Win button on the keyboard takes up useless space and is not used. Moreover, I have been searching for and testing various solutions to this problem for a long time and hard, but none of them worked normally or required almost to recompile the kernel.

But one day I found a great and easy-to-use solution - a small ksuperkey program that does this magic and is very easy to install. It is enough to install it, add it to autorun and immediately it will work as it should. Moreover, keyboard shortcuts of the Win + D type remain working.

Official website of the program: github.com/hanschen/ksuperkey
Notification of new versions and discussion: kde-apps.org/content/show.php?content=154569
')
In Ubuntu and Kubuntu, the ksuperkey program can be installed using the “pair of clicks” from the PPA: launchpad.net/~mehanik/+archive/ksuperkey using the following method via the GUI:

1. Launch “Muon Package Management Program” or for older versions it may be called “Package Manager”, “Program Manager”, “Software center”, KPackageKit, Synaptic, etc .:
image

2. Go to the Settings menu - Configure the program sources, enter the administrator password, the “Program Sources” or “Software Sources” window should open:
image

3. Open the “Other programs” tab (Other software), click the “Add” button and in the appeared field write: ppa: mehanik / ksuperkey
image

4. Click "Close", click the "Check updates" button, then type ksuperkey in the search and click on the line, then click on the "Mark for Installation" button in the lower right corner:
image

5. Click "Apply changes", after installation we close the program, restart the computer and enjoy the Win (Super key) button.

A faster way to install via the console:

sudo add-apt-repository ppa:mehanik/ksuperkey sudo apt-get update sudo apt-get install ksuperkey 


For other Linux distributions, the program can be installed using compiling from source, instructions can be found here: kde-apps.org/content/show.php?content=154569

After installation, pressing the Win button will emulate pressing Alt + F1 and perform the corresponding action, which by default opens the Kickoff menu. At the same time, other keyboard combinations of the Win + D or Win + R type continue to work normally, unlike other solutions of the type of reassigning the Win button to the F13 button via xmodmap. Accordingly, now you can configure any action you need to press Win without unnecessary dances with a tambourine.

After installation, the program may not immediately earn for the following reasons:

1. The Win button has already been reassigned via Xmodmap. To disable this, you need to delete or modify the .Xmodmap file in your home folder.

2. The Win button is marked as the Meta button in the KDE settings. To disable it, open the System Settings - Input Devices - Keyboard - Advanced and remove all the jackdaws associated with the Win button:
image

In other cases, everything started working for me right after a reboot without unnecessary actions.

Additional program settings:


In addition to the basic function of opening the Kickoff menu on the Win button, this program can be flexibly configured for any other actions with the left, right Win button, Shift, Alt, Ctrl, Menu and others. It can be configured to work with Lancelot, KRunner and any other programs. To do this, add parameters to the program's launch line:
ksuperkey -e 'ModKey=Key[|OtherKey][;NextExpression]'

Where ModKey is the key you want to reassign from the following options:
Control_L Control_R Alt_L Alt_R Super_L Super_R Shift_L Shift_R

OtherKey - a key or a combination of keys, the press of which must be emulated.

NextExpression - the next combination, respectively, you can specify as many combinations as you need.

An example of reconfiguring the Win button to launch KRunner (Alt + F2):
ksuperkey -e 'Super_L=Alt_L|F2'

A more complex example - On the left Ctrl opens Kickoff, on the left Win -Krunner, on the left Shift - the combination Ctrl + S:
ksuperkey -e 'Control_L=Alt_L|F1;Super_L=Alt_L|F2;Shift_L=Control_L|S'

To debug a program, you can run it in debug mode using the -d parameter:

ksuperkey -d -e 'Control_L=Alt_L|F1;Super_L=Alt_L|F2;Shift_L=Control_L|S'

Similarly, the launch options are written in English on the program site: kde-apps.org/content/show.php?content=154569

If you have any suggestions for the development of the program or find bugs, then do not hesitate to create themes in the bug tracker repository github.com/hanschen/ksuperkey/issues

Successful use and happiness in life! I hope now you have the Win button will also quickly wear out on the keyboard like the rest, and not remain covered with a layer of dust;)

Source: https://habr.com/ru/post/185336/


All Articles