This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Calculator key spawns dozens of KCalcs

Tags: kcalc, start kcalc, start kcalc, start
(comma "," separated)
skullmunky
Registered Member
Posts
8
Karma
0
My keyboard has a Calculator multimedia key. It's configured in System Settings->Input Actions, Preset Actions->Calculator.

It works, but it seems to trigger with key repeat, not single press and release. So unless I hit it very quickly, I get a complete screenful of KCalcs. Often it crashes the whole desktop.

It's kind of neat, but is there a way to make it not do that?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Unfortunately I do not think it is possible to do such a thing at this time. This is due to the way that keyboard handling is implemented.

As a workaround you could use it do launch a script which would only run KCalc if one instance was not already running.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
JanGerrit
Moderator
Posts
647
Karma
3
OS
I made the script bcooksley suggested:
Code: Select all
#!/bin/sh
(test "x$(qdbus '*kcalc*')" = "x")  && kcalc &

Save this text into a file (maybe called startkcalc). Make this file executable (open Dolphin, browse to the script's folder, do a right click on the script select Properties and then the tab "Permissiones" and set a hook at "Is executable") and then set this script (with path) as start command in the KCalc entry in the menu. (Right click at the menu, "Menu Editor", search for the entry, and set "Command" to the script path)

I hope it helps you, Jan


Image


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]