How do I get the calculator button on my Microsoft Keyboard to work in Kubuntu 18.04?

So I have tried looking through the shortcuts menu and I tried installing the Gnome Calculator and I still can't get it to work. I'm new to Kubuntu and I'm still learning how it works. Any help would be appreciated. Thanks.

4

1 Answer

I installed gnome-calculator on Kubuntu 18.04 using sudo apt install gnome-calculator.

Unfortunately, my keyboard has just 101 keys and so I don't have a Calculator key. Instead, I'll use F7 to illustrate:

  • Right-click on the Menu icon in your panel (marked with an arrow in the image below). You'll see a context menu with some entries but the relevant one is Edit Applications …:

Edit Applications

  • On opening Edit Applications …, you'll get the KDE Menu Editor. gnome-calculator is listed in the left pane under Utilities on my system. Left-click on it. Some details will now appear in the right pane:

KDE Menu Editor

  • Now, click on the Advanced tab above the right pane. You'll see Current shortcut key. In the field to its right, single left-click and then press the key (or key combination) you wish to use. I've pressed F7:

Setting a shortcut key to launch gnome-calculator

  • Click the Save button near the top left of the KDE Menu Editor window. Now, any time you press F7 (or whatever you've chosen), gnome-calculator will launch.

  • Note that if I press F7 repeatedly, I'll get several windows of gnome-calculator.

  • To fix that, I can modify the command (in the General tab of KDE Menu Editor) from just gnome-calculator to

    wmctrl -ax gnome-calculator.Gnome-calculator || gnome-calculator

  • Now, anytime I press F7, if gnome-calculator is open, it'll be brought into focus. If it isn't open, it will be launched. (You'll need to install wmctrl on your system using sudo apt install wmctrl.)


By the way, Kubuntu's calculator is KCalc and is part of the default installation.

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like