Create a list of keyboard shortcuts · Issue #682 · sqlitebrowser/sqlitebrowser · GitHub
Skip to content

Create a list of keyboard shortcuts #682

Open

Description

@justinclift

We've been asked via Twitter if we have a list of keyboard shortcuts:

    https://twitter.com/john_law_kelly/status/758061269702160384

We don't yet, but it would be very useful to create one, probably on the wiki.

@glawrence Any interest? 😄

Activity

  1. revolter commented on Jul 27, 2016

    @revolter
    Member

    I was thinking the other day of a Keys menu in Preferences. Where you could see and update the keyboard shortcuts. Like VLC has, for example, where you can even search through them.

  2. chrisjlocke commented on Jul 27, 2016

    @chrisjlocke
    Member

    While going through the translation files, I noticed you could set the & shortcut wherever you wanted, and initially thought it worked the same as .Net, but noticed from @justinclift's code, this has to be 'hard coded' in Qt - shortcut keys have to be specifically coded. I presume then that the accelerators defined by a & sign on labels, etc, are for cosmetic purposes only?

  3. revolter commented on Jul 28, 2016

    @revolter
    Member

    If you have a menu item with the text T&est, does pressing ALT + e on Windows trigger it? I remember this is the way ampersand worked, though I don't know how it would work on mac.

  4. justinclift commented on Jul 28, 2016

    @justinclift
    MemberAuthor

    @chrisjlocke For the top drop down menu's (eg File, View, etc), adding an & sign should in theory automatically create a platform-appropriate shortcut.

    In reality, it seems to be a bit inconsistent for DB4S. It might just be we're doing something weird, or out-of-order in our code base though. (unsure)

  5. justinclift commented on Jul 28, 2016

    @justinclift
    MemberAuthor

    @revolter If you want to add a user changeable "Keyboard Mapping" thing to the Preferences, that sounds really useful for people. 😄

  6. revolter commented on Jul 28, 2016

    @revolter
    Member

    @justinclift I know, it would be awesome. I searched for an already created library (widget) but couldn't find one :(

    I stumbled upon this package manager though, but I'm not sure that the packages page contains all of the available packages. I'll install it in a couple of days and see if I find something useful there.

  7. justinclift commented on Jul 28, 2016

    @justinclift
    MemberAuthor

    @revolter Cool. Hadn't come across qpm.io. Looks useful. 😄

  8. justinclift commented on Jul 29, 2016

    @justinclift
    MemberAuthor

    Was thinking about this earlier. If we remove the & signs from _all_ of our strings, and instead create all of the keyboard shortcuts at program startup (eg like this code, that would probably benefit us in two ways:

    • Translation of strings would probably be less complicated (eg Some strings in the main UI are not showing their translation #643)
    • The keyboard shortcuts could then be stored/retrieved using PreferencesDialog::saveSettings()/getSettingsValue(). That would let them be mapped into a new tab in the PreferencesDialog for learning/changing.

    In initial thinking through of that... depending how the "choose your new key sequence" bit is done, it could be simple to implement.

    • If we go for the simple approach, such as a Line Edit field with "Ctrl-A" (or whatever) typed in manually, we could get an initial implementation done pretty quickly
    • The most user friendly approach is probably one where the user gets to click a widget, then press their desired key combination, which the widget captures and converts to the appropriate Qt shortcut combination. That doesn't sound like a particularly quick/easy/accurate thing to implement though.

    Personally, I'd go with the first approach just to see how usable that turns out to be. It'd probably be acceptable. 😄

  9. revolter commented on Jul 29, 2016

    @revolter
    Member

    @justinclift, I don't think is a good idea to let the users type the shortcut. Even in your example, you wrote "Ctrl-A" but I would have typed "CTRL+a".

    Also, I think that a middle solution that's not complicated is to have ComboBox for the modifier keys and a 1 character limited text field like this:

    Sketch

  10. SafaAlfulaij commented on Jul 29, 2016

    @SafaAlfulaij
    Contributor

    If we remove the & signs from all of our strings

    Accelerators are triggered by Alt+E not Ctrl+E. They are different than shortcuts :)
    Shortcuts are like Ctrl+C Ctrl+V..

  11. justinclift commented on Jul 29, 2016

    @justinclift
    MemberAuthor

    @revolter Heh Heh Heh, well for me yeah it wouldn't have worked like that... I would have had to figure out to use "+" instead of "-" (as you did properly).

    Kind of thinking it wouldn't be a real issue though, as the fields would be pre-populated with the current keys. Wouldn't that clue people into the correct format to use?

    @SafaAlfulaij Well, that probably explains a few things. 😉

  12. revolter commented on Jul 29, 2016

    @revolter
    Member

    @justinclift, I personally wouldn't bet on that. There are a lot of people who don't pay attention, and we can't (and shouldn't) rely on them.

  13. 4 remaining items

  14. vtronko commented on Sep 1, 2016

    @vtronko
    Member

    @revolter why would user type a shortcut? He would just press it and apply settings.

  15. vtronko commented on Sep 1, 2016

    @vtronko
    Member

    You guys really don't understand how it works, nobody enters shortcuts in text field.

  16. vtronko commented on Sep 1, 2016

    @vtronko
    Member

    You worry about irrelevant things. Relevant thing is to create observer which would control all possible shortcuts in all possible classes where they are currently hardcoded.
    If someone creates a list of those in wiki, I'll implement it.
    UPD: list of shortcuts that can be changed.

  17. justinclift commented on Sep 1, 2016

    @justinclift
    MemberAuthor

    Thanks @chrisjlocke. 😄

    With Ctrl+P, it's probably that way from when it was first implemented. P == Plot or similar.

    On the other hand though, Ctrl+P is commonly by programs to mean "Print". (eg send the document, view, whatever to a printer)

    @innermous That's a bit confusing. When you say "shortcuts that can be changed", are you meaning some shortcuts can't be?

  18. vtronko commented on Sep 1, 2016

    @vtronko
    Member

    @justinclift why would you change "Open file" shortcut, for example?

  19. justinclift commented on Sep 1, 2016

    @justinclift
    MemberAuthor

    Heh Heh Heh

    Sure, I don't have a need to... but some people might. (possibly assistive devices maybe? but I really don' t know)

    Anyway, isn't the whole point that we give people a choice, so if they want to change it they can? 😄

  20. vtronko commented on Sep 1, 2016

    @vtronko
    Member

    @justinclift never mind then, I don't like where it goes.

  21. justinclift commented on Sep 1, 2016

    @justinclift
    MemberAuthor

    No worries @innermous. 😄

  22. chrisjlocke commented on Sep 1, 2016

    @chrisjlocke
    Member

    I think once you have a system to change the keys ... someone likes Ctrl+R as thats what they're used to, but someone else is used to F5... then you can 'open the system' so people can change it all - you may as well change any key rather than just this one, that one or the other...

    At work, we use the 'ICE' method of prioritising - impact, cost and ease. The impact here is higher usability, but I'm not sure on the ease, so its hard to weigh this issue amongst all the others. With VB, its quite easy to 'soft code' such doodlies. I'm not sure if the same can be done in Qt.

  23. revolter commented on Sep 2, 2016

    @revolter
    Member

    @revolter why would user type a shortcut? He would just press it and apply settings.

    @innermous, Where did I say that?

  24. vtronko commented on Sep 2, 2016

    @vtronko
    Member

    @revolter

    I don't think is a good idea to let the users type the shortcut.

  25. vtronko commented on Sep 2, 2016

    @vtronko
    Member

    Anyway, I am already working on it. Help with testing would be really appreciated, as well as another wiki page for OS X shortcuts since those are beyond my conversance.

  26. revolter commented on Sep 2, 2016

    @revolter
    Member

    I said that the users should not type the shortcuts.

  27. chrisjlocke commented on Sep 2, 2016

    @chrisjlocke
    Member

    @revolter's solution (combo box and textbox) is the best solution - easier to validate what the user wants. The Windows' method (ie, VB) is painful!

    image

    Just because 'Ctrl' isn't in the right case, it throws a wobbly.

  28. revolter commented on Feb 27, 2017

    @revolter
    Member

    Noticed SmartGit's solution for this, from which we might take some ideas:

    screen shot 2017-02-27 at 15 20 47

    It detects duplicated and shows a breadcrumb style name separated by |.

    screen shot 2017-02-27 at 15 22 30

    Here I set shortcuts for Check Out and Cherry-Pick and the initial ones move to the Default column.

    screen shot 2017-02-27 at 15 22 38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions