Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a calculator button on my keyboard. Under Windows it starts Windows calculator. But under Xubuntu (but with kubuntu-desktop) it starts nothing, it is inactive. To start a calculator I have to choose it from Application > Utilities now.

How may I connect calculator button with calculator to start it as in Windows.

share|improve this question

2 Answers 2

if you are using Compiz Config Settings Manager (CCSM) You can use the "Commands" Plugin to "Assign bindings to arbitrary commands". The "Commands" Plugin can be easily installed by dropping the next in a terminal: sudo apt-get install compiz-plugins-extra.

Its powerful key grabber may have better chances to catch the custom keyboard buttons presses in order to provide the proper key binding which can be assigned to the proper command in the list. A Key Binding for a command, this is: "Run command 0" will invoke the line that you write in the Commands section related to the "Command line 0".

In the "Commands" tab of the "Commands Plugin", we write the arbitrary commands that we wish to be executed when we hit the proper key or key bindings, as shown in the next screenshot:

enter image description here

Then we click on the "Key Bindings" tab of the same window in order to enable the proper key bindings for the command. Please notice that I placed the command for the calculator in the "Command line 1" thus the key bindings will be which corresponds to the "Run command 1" as shown in the next screenshot.

enter image description here

What I did to see the "Edit Run command 1" key bindings it was to click in the "Disabled" button to the right, which showed me a window with a checkbox, after enabling it showed the options. Then simply hit the "Grab key combination" and press the proper button in your keyboard. Please notice that the key bindings corresponds to the "XF86Calculator" key.

This way you can define as many custom key bindings to fit your needs.

Good luck!

P.S. Compiz Config Settings Manager can be installed from the Software Center or by dropping sudo apt-get install ccsm in a terminal.

share|improve this answer
    
Does this plugin have to be installed manually? (or alternatively which version of Ubuntu/ccsm is this?) - I've opened up mine (CCSM 0.9.9.0 on 13.04) and there's no commands plugin available anywhere (at least, not that I can see) –  Jez W Jul 18 '13 at 16:05
    
I can't remember if it came pre-installed with the default plugins but you can try installing the Extra Plugins by dropping in a terminal: sudo apt-get install compiz-plugins-extra and check again. Please inform if you succeed. –  Geppettvs D'Constanzo Jul 18 '13 at 16:26
    
Yep, it appears after installing the extra plugins package, doesn't seem to be installed with the defaults. Would be worth mentioning in the answer. –  Jez W Jul 18 '13 at 16:28
    
Already edited, thank you for pointing that. :) Don't forget to let us know if you succeed with your key binding for your calculator. –  Geppettvs D'Constanzo Jul 18 '13 at 16:31

Edit: Sorry, I somehow managed not to see that you are using KDE... This answer is for Xfce...

Afaik these keys can be assigned the same way as any other keyboard shortcuts:

Go to Settings -> Keyboard -> Shortcuts for Applications. (or similar - I'm using the German localization). There should be a button to add new custom keyboard shortcuts.

The first dialogue that pops up after pressing the add button will ask about the command that should be run. I don't know by heart, which calculator is installed on Xubuntu, but you can try to enter xcalc as command name, or maybe gnome-calculator.

The second dialogue will then record the key you press.

share|improve this answer
    
You got me excited there, I have a social network button on my Packard Bell, but when I try to assign it to a command it reports as L and doesn't start anything, so not all keys can be used like that, I'm sorry to say. –  SimplySimon Jul 18 '13 at 15:04
    
if that key is coming through as an L, you may need to change keyboard layouts. Try these instructions: wikihow.com/Change-Keyboard-Layout-in-Ubuntu –  ImaginaryRobots Jul 18 '13 at 16:51
    
With laptops it's often a different issue. Many of the laptop special keys require that a special WMI driver for the respective laptop model is installed. –  soulsource Jul 19 '13 at 5:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.