Bug 337230

Summary: frameworks port not working at all
Product: [Unmaintained] khotkeys Reporter: Harald Sitter <sitter>
Component: generalAssignee: Michael Jansen <kde>
Status: RESOLVED FIXED    
Severity: grave CC: Ben.Kevan, bhush94, gandalflechner, i1387094, jhnnslschnr, kdebugs.81do7, lbeltrame, mysticfallband, naelphin, rolf.offermanns, rotter.martinos, soulthreads, tomas.chvatal, valeriodean
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In: 5.1.1
Sentry Crash Report:

Description Harald Sitter 2014-07-08 11:27:31 UTC
what the title says. I find it hard to put my finger on any particular issue because khotkeys right now seems to be completely non-functional.

According to .xsession-errors it loads correctly but that's about it, adding a qdebug to shortcut_trigger.cpp's ::triggered results in no output, so as far as I can tell keyboard input is entirely defunct at this point.

This effectively renders the following pieces of the workspace broken:
- kmenuedit's global-shortcut-for-application feature
- printscreen doesn't launch ksnapshot

(to a lesser extent the kcm itself apparently is not include in systemsettings thus not offering the shortcuts support offered in 4.x)

Reproducible: Always
Comment 1 Antonio Rojas 2014-07-09 09:21:27 UTC
*** Bug 336975 has been marked as a duplicate of this bug. ***
Comment 2 Luca Beltrame 2014-10-21 08:36:35 UTC
This issue is actually made up of two distinct problems:

- runtime assignment does not work
- configuration is reset on each khotkeys startup (wiping all changes)

I tried looking at the code to see why, but it's so complex, at least for my C++ experience, that I understoond nothing of it.
Comment 4 David Edmundson 2014-10-24 10:45:38 UTC
Git commit e1faf20d79d63f45afd5fcdafdecc4cb59aaaf2e by David Edmundson.
Committed on 24/10/2014 at 10:44.
Pushed by davidedmundson into branch 'Plasma/5.1'.

When loading the configuration set active shortcut not the default shortcut

Otherwise hotkeys don't work
FIXED-IN: 5.1.1

M  +1    -1    libkhotkeysprivate/shortcuts_handler.cpp

http://commits.kde.org/khotkeys/e1faf20d79d63f45afd5fcdafdecc4cb59aaaf2e
Comment 5 David Edmundson 2014-10-24 10:47:19 UTC
*** Bug 339446 has been marked as a duplicate of this bug. ***
Comment 6 David Edmundson 2014-10-24 10:47:26 UTC
*** Bug 337902 has been marked as a duplicate of this bug. ***
Comment 7 David Edmundson 2014-10-24 11:05:50 UTC
*** Bug 340118 has been marked as a duplicate of this bug. ***
Comment 8 Martin Rotter 2014-10-24 14:44:01 UTC
Oh, nice fix.
Comment 9 Bhushan Shah 2014-10-24 15:15:13 UTC
*** Bug 340293 has been marked as a duplicate of this bug. ***
Comment 10 David Edmundson 2014-11-03 10:24:27 UTC
*** Bug 337598 has been marked as a duplicate of this bug. ***
Comment 11 David Edmundson 2014-11-03 10:25:29 UTC
*** Bug 340103 has been marked as a duplicate of this bug. ***
Comment 12 Rob 2015-07-19 01:16:02 UTC
Maybe related/returned?  This issue -- or a piece of it -- now exists for KDE 5.3.90-git

I'm running plasma5+kf5* etc from git-latest, using Opensuse pkgs. currently with

  plasma5-desktop-5.3.91git~20150713T211720~61fe1bc-108.1.x86_64
  khotkeys5-5.3.91git~20150604T013319~78dd188-4.3.x86_64
  kglobalaccel5-5.13.0git.20150710T145714~05ae172-1.1.x86_64

I can easily create "Send Keyboard Input" custom shortcut that'll type text into an active window -- for non-symbol keys, specifically [aA-zZ][0-9]

However, special characters [ !@#$%^&*() ] are no longer output.

For example, an exclamation-point.  With earlier versions of KDE5, on a machine that has

  libKF5GlobalAccel5-5.12.0-60.1.x86_64

an action of "Shift+1", when triggered, properly types the exclamation point.  Same is true for the rest of the set.

Switching to the currently-installed versions, however, the same defined action, on trigger, outputs nothing.  It just fails silently.
Comment 13 i1387094 2015-10-10 22:13:01 UTC
I installed

khotkeys5-5.4.90git~20150822T211938~c0484e4-1.1.x86_64
kglobalaccel5-5.15.0git.20151005T231957~bf71e53-2.1.x86_64

from my distro's packages (Opensuse).

It looks like 2 things aren't working.

	(1) Triggers that use "Ctrl"
	(2) Actions that have "Shift-ed" keys

It looks like problem is contained in khotkeys, since global accels in general work (https://bugs.kde.org/show_bug.cgi?id=341959#c42)

At KDE's

	"System Settings" >
		"Shortcuts" >
			"Custom Shortcuts" >
				"Configure Input Actions settings"

first, anytime you use the 'Ctrl' key there's no output

	Action = t:e:s:t

		Trigger          Output
		============     ===========
		Ctrl+T           (none)
		Alt+T            test
		Meta+T           test
		Ctrl+Alt+T       (none)
		Meta+Ctrl+T      (none)
		Meta+Alt+T       test
		Meta+Ctrl+Alt+T  (none)

Second, "Shifted" keys (for example 'Shift+2' == "@") don't work

	Action = t:e:s:t:Shift+2

		Trigger          Output
		============     ===========
		Ctrl+T           (none)
		Alt+T            test
		Meta+T           test
		Ctrl+Alt+T       (none)
		Meta+Ctrl+T      (none)
		Meta+Alt+T       test
		Meta+Ctrl+Alt+T  (none)

If you test the "kcmshell5 keys", it works.

If in "Global Keyboard Shortcuts" I select

	KDE component = krunner

and change "Run command" from

	Global = Default: Alt+Space (which works)

to

	Global = Custom: Meta+Ctrl+Alt+T

it works OK using "Meta+Ctrl+Alt+T", and launches 'krunner'.

Looking for khotkeys bugs

	https://bugs.kde.org/buglist.cgi?product=khotkeys&component=general&resolution=---&list_id=1301814

There's a long list that suggests the khotkeys component is

	a) severely broken
	b) virtually unmaintained

I sure don't know why it's different than the kglobalaccel stuff. To me they seem pretty much linked together from a user perspective.

It's for sure working on older KDE4 setups, though. So it's not a new thing.

It was working then broken. Does that make it a "regression"?

It doesn't look like anyone decided to stop having it in KDE since it's obviously still "in there". I know I use it a lot. From that list it looks like others do too.
Comment 14 i1387094 2015-10-10 22:31:48 UTC
I don't know how to add a "See also" flag, so, see also:

Bug 341959 - kwin shortcuts don't work when using meta + shift + <number>
Bug 345495 - Switch to Previous Desktop shortcut moves to Next, instead
Bug 253842 - Problems with Shift+... hotkeys and KeyPad hotkeys
Comment 15 i1387094 2015-10-11 01:38:41 UTC
moved to a NEW bug: https://bugs.kde.org/show_bug.cgi?id=353781