[opensuse] Assigning key to an application
My ThinkPad E520 has a calculator button. In Windows, pressing that key starts the calculator. Is it possible to map that key to KCalc in the KDE desktop? If so, how? There are also keys for locking the desktop, search and Computer folder that may be useful in Linux. tnx jk -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Am Samstag, 19. November 2011, 15:17:35 schrieb James Knott:
My ThinkPad E520 has a calculator button. In Windows, pressing that key starts the calculator. Is it possible to map that key to KCalc in the KDE desktop? If so, how?
Open a konsole and run xev. If the konsole shows some output while you press one of those keys you can assign it via the normal KDE (global) shortcuts e.g. in systemsettings. Sven -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Saturday 19 Nov 2011 21:59:23 Sven Burmeister wrote:
Am Samstag, 19. November 2011, 15:17:35 schrieb James Knott:
My ThinkPad E520 has a calculator button. In Windows, pressing that key starts the calculator. Is it possible to map that key to KCalc in the KDE desktop? If so, how?
Open a konsole and run xev. If the konsole shows some output while you press one of those keys you can assign it via the normal KDE (global) shortcuts e.g. in systemsettings.
You can't map keys to applications in the global shortcuts dialog, but you can in kmenuedit (right click on start menu, edit applications). Look in the advanced tab for the application you want to launch. WIll -- Will Stephenson, openSUSE Team SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Am Samstag, 19. November 2011, 23:09:02 schrieb Will Stephenson:
On Saturday 19 Nov 2011 21:59:23 Sven Burmeister wrote:
Am Samstag, 19. November 2011, 15:17:35 schrieb James Knott:
My ThinkPad E520 has a calculator button. In Windows, pressing that key starts the calculator. Is it possible to map that key to KCalc in the KDE desktop? If so, how?
Open a konsole and run xev. If the konsole shows some output while you press one of those keys you can assign it via the normal KDE (global) shortcuts e.g. in systemsettings.
You can't map keys to applications in the global shortcuts dialog, but you can in kmenuedit (right click on start menu, edit applications). Look in the advanced tab for the application you want to launch.
In system settings > shortcuts and gestures > own shortcuts (translated form German) you can add new global shortcuts to e.g. start ksnapshot when "print " is pressed. I'd guess it works for other apps as well. Sven -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Sven Burmeister wrote:
Am Samstag, 19. November 2011, 23:09:02 schrieb Will Stephenson:
On Saturday 19 Nov 2011 21:59:23 Sven Burmeister wrote:
Am Samstag, 19. November 2011, 15:17:35 schrieb James Knott:
My ThinkPad E520 has a calculator button. In Windows, pressing that key starts the calculator. Is it possible to map that key to KCalc in the KDE desktop? If so, how?
Open a konsole and run xev. If the konsole shows some output while you press one of those keys you can assign it via the normal KDE (global) shortcuts e.g. in systemsettings.
You can't map keys to applications in the global shortcuts dialog, but you can in kmenuedit (right click on start menu, edit applications). Look in the advanced tab for the application you want to launch.
In system settings> shortcuts and gestures> own shortcuts (translated form German) you can add new global shortcuts to e.g. start ksnapshot when "print " is pressed. I'd guess it works for other apps as well.
Sven
I've tried the kmenuedit method. The button produces Launch (1) and it's set to run KCalc, but when I press that button, nothing happens. In that shortcuts & gestures, I see it's included under KMenuEdit, Custom Shortcuts where KCalc is present and selected and trigger lists Launch (1) and Action is KCalc. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Saturday 19 Nov 2011 23:48:04 James Knott wrote:
Sven Burmeister wrote:
Am Samstag, 19. November 2011, 23:09:02 schrieb Will Stephenson:
On Saturday 19 Nov 2011 21:59:23 Sven Burmeister wrote:
Am Samstag, 19. November 2011, 15:17:35 schrieb James Knott:
My ThinkPad E520 has a calculator button. In Windows, pressing that key starts the calculator. Is it possible to map that key to KCalc in the KDE desktop? If so, how?
Open a konsole and run xev. If the konsole shows some output while you press one of those keys you can assign it via the normal KDE (global) shortcuts e.g. in systemsettings.
You can't map keys to applications in the global shortcuts dialog, but you can in kmenuedit (right click on start menu, edit applications). Look in the advanced tab for the application you want to launch.
In system settings> shortcuts and gestures> own shortcuts (translated form German) you can add new global shortcuts to e.g. start ksnapshot when "print " is pressed. I'd guess it works for other apps as well.
Sven
I've tried the kmenuedit method. The button produces Launch (1) and it's set to run KCalc, but when I press that button, nothing happens. In that shortcuts & gestures, I see it's included under KMenuEdit, Custom Shortcuts where KCalc is present and selected and trigger lists Launch (1) and Action is KCalc.
Oh, I saw that behaviour too, but since it only happens with the calculator key, not the other app keys, I assumed it was specific to my cherry cymotion linux keyboard. Will -- Will Stephenson, openSUSE Team SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Will Stephenson wrote:
I've tried the kmenuedit method. The button produces Launch (1) and
it's set to run KCalc, but when I press that button, nothing happens. In that shortcuts& gestures, I see it's included under KMenuEdit, Custom Shortcuts where KCalc is present and selected and trigger lists Launch (1) and Action is KCalc.
Oh, I saw that behaviour too, but since it only happens with the calculator key, not the other app keys, I assumed it was specific to my cherry cymotion linux keyboard.
FWIW, xev shows a key code of 148 and that it's apparently connected to XF86Calculator. However, there is no XF86Calculator on my computer. I even tried a symlink for it to KCalc, but that also didn't do anything. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Sunday 20 Nov 2011 10:10:13 James Knott wrote:
Will Stephenson wrote:
I've tried the kmenuedit method. The button produces Launch (1) and
it's set to run KCalc, but when I press that button, nothing happens. In that shortcuts& gestures, I see it's included under KMenuEdit, Custom Shortcuts where KCalc is present and selected and trigger lists Launch (1) and Action is KCalc.
Oh, I saw that behaviour too, but since it only happens with the calculator key, not the other app keys, I assumed it was specific to my cherry cymotion linux keyboard.
FWIW, xev shows a key code of 148 and that it's apparently connected to XF86Calculator. However, there is no XF86Calculator on my computer. I even tried a symlink for it to KCalc, but that also didn't do anything.
"XF86Calculator" is the name of a keysym, not an app. And I noticed why only the Calculator key shows up as 'Launch(1)': at http://doc.qt.nokia.com/4.7/qt.html#Key-enum: Qt::Key_Launch1 0x010000a3 On X11 this key is mapped to "Calculator" (XF86XK_Calculator) key for legacy reasons. The issue is described and workarounded at https://bugs.kde.org/show_bug.cgi?id=263109 Will -- Will Stephenson, openSUSE Team SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Will Stephenson wrote:
The issue is described and workarounded at https://bugs.kde.org/show_bug.cgi?id=263109
That does it. tnx -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
If the konsole shows some output [for xev] while you press one of those keys you can assign it via the normal KDE (global) shortcuts e.g. in systemsettings.
Sven Is that always so ? Because I have a keyboard with a bunch of fancy multimedia keys, which seem fine in xev, but that I can't bind in systemsettings -> Shortcuts -> Standard shortcuts (or whatever it's called in english, I run a French KDE). I got a "The key you just
Hi everyone ! First of all : congratulations for this 12.1 release, it's a wonderful job !! Actually, this gives me the opportunity to ask for a bit of help on a slight issue : Le 19/11/2011 21:59, Sven Burmeister a écrit : pressed is not supported by Qt" error ... Any clues ? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Sunday 20 Nov 2011 00:04:09 akouane wrote:
Hi everyone !
First of all : congratulations for this 12.1 release, it's a wonderful job !!
Actually, this gives me the opportunity to ask for a bit of help on a slight issue :
Le 19/11/2011 21:59, Sven Burmeister a écrit :
If the konsole shows some output [for xev] while you press one of those keys you can assign it via the normal KDE (global) shortcuts e.g. in systemsettings.
Sven
Is that always so ? Because I have a keyboard with a bunch of fancy multimedia keys, which seem fine in xev, but that I can't bind in systemsettings -> Shortcuts -> Standard shortcuts (or whatever it's called in english, I run a French KDE). I got a "The key you just pressed is not supported by Qt" error ...
Any clues ?
This means that the keypresses aren't mapped to values in the Qt::Key[1] enum (list of all keys) that KDE uses to work with keyboard events. The logic is: Raw key code -> keysym code -> Qt::Key -> KDE shortcuts program handles it Eg 171 -> 0x1008ff17 (XF86AudioNext) -> 0x01000083 (Qt::Key_MediaNext) -> kglobalaccel tells Amarok to skip to next tune. Either you need to specify the keyboard type to the X server, so it produces a raw code that X and converts to the standard keysym code (in other words, the first mapping is failing for you, or the keyboard has keys that Qt really doesn't know about yet (the second mapping fails). To find out what is happening, run xev in a console, focus the xev window, press the key, and copy us the "KeyPress event" output that appears. Will [1] http://doc.qt.nokia.com/4.7/qt.html#Key-enum -- Will Stephenson, openSUSE Team SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 20/11/2011 15:57, Will Stephenson a écrit :
On Sunday 20 Nov 2011 00:04:09 akouane wrote:
I have a keyboard with a bunch of fancy multimedia keys, which seem fine in xev, but that I can't bind in systemsettings -> Shortcuts -> Standard shortcuts (or whatever it's called in english, I run a French KDE). I got a "The key you just pressed is not supported by Qt" error ... This means that the keypresses aren't mapped to values in the Qt::Key[1] enum (list of all keys) that KDE uses to work with keyboard events.
The logic is: Raw key code -> keysym code -> Qt::Key -> KDE shortcuts program handles it
Either you need to specify the keyboard type to the X server, so it produces a raw code that X and converts to the standard keysym code (in other words, the first mapping is failing for you, or the keyboard has keys that Qt really doesn't know about yet (the second mapping fails).
To find out what is happening, run xev in a console, focus the xev window, press the key, and copy us the "KeyPress event" output that appears.
Will Thank you for the reply. So there you go, the xev output :
KeyPress event, serial 34, synthetic NO, window 0x6200001, root 0x15d, subw 0x0, time 25674737, (27,-259), root:(1066,373), state 0x10, keycode 139 (keysym 0xff65, Undo), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False KeyRelease event, serial 34, synthetic NO, window 0x6200001, root 0x15d, subw 0x0, time 25674841, (27,-259), root:(1066,373), state 0x10, keycode 139 (keysym 0xff65, Undo), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False I suppose a solution is at reach since the key pressed is precisely designed to "Undo", so a lizard somewhere in this distro knows what to do with it ... ;-) Have a nice sunday, Antoine -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Sunday 20 Nov 2011 16:20:50 akouane wrote:
Thank you for the reply. So there you go, the xev output :
KeyPress event, serial 34, synthetic NO, window 0x6200001, root 0x15d, subw 0x0, time 25674737, (27,-259), root:(1066,373), state 0x10, keycode 139 (keysym 0xff65, Undo), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False
KeyRelease event, serial 34, synthetic NO, window 0x6200001, root 0x15d, subw 0x0, time 25674841, (27,-259), root:(1066,373), state 0x10, keycode 139 (keysym 0xff65, Undo), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False
There is no 'Undo' key defined in the Qt key enum I mentioned above, so you'll have to wait for us to ship a version of Qt that knows about 'Undo' keys. Will -- Will Stephenson, openSUSE Team SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 21/11/2011 09:41, Will Stephenson a écrit :
you'll have to wait for us to ship a version of Qt that knows about 'Undo' keys. Will Ok.
Thanks Will for the answer. I'll sitck to the good old Ctrl-Z for now ;) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (4)
-
akouane
-
James Knott
-
Sven Burmeister
-
Will Stephenson