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

keyboard shortcuts in the window switchers

Tags: None
(comma "," separated)
sir_herrbatka
Registered Member
Posts
212
Karma
0
ok so I just started looking how those switchers actually work, and what i found in the code is something like this:

Code: Select all
  Keys.onPressed: {
        if (event.key == Qt.Key_Up) {
            textListView.decrementCurrentIndex();
            textListView.currentIndexChanged(textListView.currentIndex);
        } else if (event.key == Qt.Key_Down) {
            textListView.incrementCurrentIndex();
            textListView.currentIndexChanged(textListView.currentIndex);
        }


(Code taken from task switcher.)

But pressing key_up or key_down have no inpact on the switcher. Is this broken or it is because i am holding alt key as well?
luebking
Karma
0
This will probably only apply to the non-modal switcher invocation (what you can eg. reach w/ an active screen corner or dbus)

The modal one is afair still strictly sequential (Alt+Back|Tab)
sir_herrbatka
Registered Member
Posts
212
Karma
0
Nope, non-modal also won't work.
luebking
Karma
0
Afacis it works and only works by screencorner invocation.
For non-modal dbus invocation, the grab is not established (ie. the keyboard events go the the active client) and modal dbus invocations quit apparently immediately. Latter seems like a bug, but i don't know (dbus interface was afair tailored on plasma-active)
sir_herrbatka
Registered Member
Posts
212
Karma
0
I don't know either. I think that it used to work back in the 4.8 days even for modal switcher (at least for windows wall, code seems to be identical to that in the text switcher) but switching windows with arrows is not that usefull so i ignored that feature. I wanted to add shortcut for closing window with window switcher (vistaswitcher style) — that's why I'm intereseted in this feature again.
luebking
Karma
0
Please note that the dbus interface is removed in KF5 anyway.

Depending on your usecase, you likely *want* to bind the shortcut to close a window to sth. Alt/Meta modified - or the tabbox implementation has to blend out this modifier from the event sent to the tabbox client (where the latter would probably be more reasonable, so that the same qml client works in modal and non-modal state)


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], q.ignora, watchstar