-
Notifications
You must be signed in to change notification settings - Fork 212
Description
Description
Please consider adding the zero key at the end of the 1-9 Alt-key keyboard shortcuts to access search list results.
Alt+1
Alt+2
Alt+3
Alt+4
Alt+5
Alt+6
Alt+7
Alt+8
Alt+9
Alt+0
Alt+a
Alt+b
Alt+c ...
Since they are just shortcuts and the numbers and letters don't actually mean anything specific, I see no obvious reason that the zero key can't be added and be a useful shortcut for the tenth item on the results list, before moving on to the a-z letter keys.
The number key row format of 1-2-3-4-5-6-7-8-9-0 seems to be fairly standard even with international keyboards, so it should be an intuitive addition to the available keyboard shortcuts, even for non-US keyboard users. The shortcuts are displayed on each line of results, so there would be no need for any user to "learn" the new shortcut or remember it. They'll just see it displayed after the Alt+9
and before the Alt+a
shortcuts.
This would also mean that the user could display up to 10 frequently used apps and all of the keyboard shortcuts shown would be numeric, all on the same keyboard row. I think some users might find that very pleasant, in a way.
I would like to see this added to the current version of Ulauncher, but at the very least I'd like this to be considered as an addition to the v6 release.
I tried changing the line in ulauncher/ui/ResultItemWidget.py
that seems to be responsible for assigning the keyboard shortcuts from this:
def set_index(self, index):
"""
Set index for the item and assign shortcut
"""
self.index = index
# Alt+1..9, then Alt+a..z
index_text = index + 1 if index < 9 else chr(97 + index - 9)
self.shortcut = 'Alt+%s' % index_text
self.set_shortcut(self.shortcut)
To this:
def set_index(self, index):
"""
Set index for the item and assign shortcut
"""
self.index = index
# Alt+1..9, then Alt+a..z
index_text = index + 1 if index < 9 else index - 9 if index == 9 else chr(97 + index - 10)
self.shortcut = 'Alt+%s' % index_text
self.set_shortcut(self.shortcut)
This results in an Alt+0
shortcut showing on the list after the Alt+9
and before the Alt+a
shortcut, but the line labeled with Alt+0
still responds to Alt+a
and the Alt+0
shortcut does nothing. So there is obviously something I'm really not understanding about exactly how the shortcut is assigned to each line in the results window.
Communication guidelines
- I have read and agree with Ulauncher's communication guidelines and checked the existing enhancement requests before suggesting this.