mpogue2 / SquareDesk

Fully-featured music player and sequence designer, designed for square dance callers
10 stars 4 forks source link

Feature: keyboard shortcut to filter down to just Patter or just Singing calls #85

Closed mpogue2 closed 5 years ago

mpogue2 commented 7 years ago

Suggested by Peter Höfelmeyer. It would make it much quicker to get from patter to singing call list, without having to use the mouse to get to one of the search boxes.

It has some complexity when the patter consists of several subdirectories. Maybe the key sequence just clears out the search fields, and puts the Patter string in Preferences into the Type field, AND we allow ";" to mean "OR". Or, maybe it always takes you to the FIRST one in the semicolon-separated list.

Several possibilities here, but I like the idea of getting to Patter and/or Singing more quickly, and a shortcut would not take any more space.

Also, it's rare, I think, that a caller needs BOTH Patter and Singing Calls showing at the same time. Generally, in SqView, the user's attention is on one box or the other, but not both boxes at the same time.

Something like Cmd-1, Cmd-2, Cmd-3, Cmd-4 might work, too, since we have 4 basic categories by design.

mpogue2 commented 7 years ago

As Peter points out, this could also be done with buttons, but that would take up more space, and space is at a premium right now...I am reluctant to downsize other controls for this feature, so a keyboard shortcut would seem like the best approach.

Could also have menu items in the View menu. That would make it more discoverable, too.

phoef commented 7 years ago

For keyboard-shortcuts I personally prefer one-key-shortcuts. Faster access, especially if you have to or want to operate during calling ;-)

mpogue2 commented 7 years ago

What keys would you suggest? Are there other applications which have a similar function (so we might want to choose the same key)?

mpogue2 commented 7 years ago

The T key now toggles between Music and Lyrics tabs. So, it got me thinking about this one.

Maybe this should toggle between Patter (all the ones set in the Preferences, because there might be several separate folders of patter), Singing (all the ones set in the Preferences), and All (which is the default when entering the program). Maybe Get Extras in the loop, too for the interstitial songs, like line dances, rounds, etc? So, Patter to Singing would be one press of the hotkey, Singing to Patter would be another 3 presses. But, some people will just press once to get to the Rounds, and then 2X to get back to patter only, or 1X to get back to All.

To me, it seems pretty powerful and still pretty simple (to do, and to understand) this way. Any thoughts?

danlyke commented 6 years ago

034f2072c026aaa48f6d8f2ac441effdd77af2ab adds two actions which an be hotkey assigned as the user wishes...

danlyke commented 6 years ago

Shouldn't have closed this, because...

I added the option to toggle between singers and patter, using the first entry in the music type list, but being able to do something that toggles between all of the different options seems super powerful. I just haven't figured out the right semantics for that yet.

phoef commented 6 years ago

I am looking forward to this feature in the next alpha-version ;-) I like the option to chose my own hotkeys!

Is it an idea and is it possible to make it optional which types of music will be there to chose by hotkey? For example I like it to have a place for the vocal version of a singing call, but on the other hand don't need this version when I am at a dance. It happens that I played by accident the vocal version :-)

danlyke commented 6 years ago

Hmmm... Seems like maybe another field in the config which lets you enter a list of terms that can be toggled between? "sing;patter;round;filler" or something like that? Seems like doing another table for this (ala the sessions and the tags) is excessive, but I could definitely do a text field like the other lists...

danlyke commented 6 years ago

And re keybindings: I like the idea that we can add features and let people use them as they wish, or not, and at some point I can see adding another field for binding MIDI events, so that you could use additional MIDI pads for additional buttons: There are some neat relatively affordable arrays of buttons that speak USB MIDI...

danlyke commented 5 years ago

569941398cefa0f0701cb19639eb72226cc499e9 adds a field in the first page of the preferences dialog that lets the user choose a list of values to cycle between. Would like @mpogue2 to weigh in; there's often UI insight that I'm not seeing, and I'm not sure how close I'm getting to the vision up-thread.

danlyke commented 5 years ago

Yeah, this feature's gonna stay with me. Would love feedback on the implementation, but it's bound to Control-T and I used it last night and don't wanna give it up.

mpogue2 commented 5 years ago

I LOVE this feature! Couple of minor things: 1) I have no idea where to see that it was bound to ^T....I think it needs an entry in the Hotkeys table where I can see what the current binding is, and then change it if I prefer something else...what is this feature called? (something like "cycle between X;Y;Z" where X;Y;Z was selected on the Preferences > Music tab?, or maybe "Filter Songs Cycle X;Y;Z" or something similar...) Oh wait...I tested it on a guess, and the function is indeed "Filter Songs Toggle Patter/Singers". Maybe it could also be called "Filter Songs Toggle Sequence" to align it with "Toggle Sequence" on the other page? 2) Toggle Sequence help on the Preferences > Music needs to be in the smaller font used by the other help text on that tab... 3) The default for Toggle Sequence is currently "". It should be "patter;singing", I think, if that's how it works (in other words, it should show what the default currently is). 4) Current hotkey names are "Filter Songs to Singers" and "Filter Songs Toggle Patter/Singers", but on the Music tab, we call singers "Singing". This is probably in part because I never heard them called "singers" until I came to California...they were always "singing calls" back in Illinois. Maybe I am behind the times? :-) In any case, I think the names should be consistent (I prefer Singing just because that's what the current default is, but I could be convinced if you felt strongly that it needs to change!).

danlyke commented 5 years ago

Feel free to rename it. Also feel free to set up a default binding, I currently don't have one in there. If you haven't by mid-day tomorrow I'll try to incorporate your suggestions. .

If that field is blank, it uses the first entry in the "Patter" and "Singing" sections. I left it blank for that reason.

I like consistency. I always call 'em "singers", but am happy to go with "Singing".

phoef commented 5 years ago

Good to see how worth it is to make suggestions - but it is only worthwhile if there is openness on the other side :-) Thank you!

Is there a way to make an alpha again with this feature? On the other hand I should learn how to compile source code on my own. It is valuable to learn something new ;-)

danlyke commented 5 years ago

What plaform are you on? I'll have a Mac soon, and I've got some Windows issues to work out to make this usable for another friend, so a "what do I download from where" ala the Linux compilation guide would be handy...

phoef commented 5 years ago

I'm on MacOS

mpogue2 commented 5 years ago

I can make you a Mac OS X Alpha version...or rather, because it won't be very tested, nor will it have the above changes, it will be more like a "pre-Alpha"...I'll create a special Dropbox folder for you (I already have your email address, so I'll send you the Dropbox invite that way)...

mpogue2 commented 5 years ago

version 0.9.2a7b pushed to PeterH's Dropbox

danlyke commented 5 years ago

@phoef yeah, I implement the stuff that matters to me, and this was a "well, that seems easy, and might be cool", and it turns out is way cooler than I anticipated it being.

@mpogue Okay, went in to make those changes and...

  1. "Filter Songs Toggle Sequence" is a noun, we're looking at the toggle sequence. I don't think that's the right thing to call the hotkey mapping. Also, because we're only overriding with the default key presses if the user hasn't set key presses, we have the problem that adding this to existing installations means it's unbound. Not sure how to deal with that.
  2. Whoops, we set that with code and I forgot to add that.
  3. If nothing is set there, it uses the first element from the "Patter" and "Singing" fields. Which is why I defaulted to blank, you only need to set it if you want some other behavior.
  4. Changed to "Singing", you'll have to fix your own hotkey mappings.

So changes mentioned in 35c29db838dde2a77914404f69c7ed35f338f8c8.

mpogue2 commented 5 years ago
  1. I'm open to other suggestions for the name! How about just "Filter Songs Toggle"? 1b. Yeah, it's not discoverable right now. If it just had ^T (or whatever) in the Hotkey 1 column, I think that would accomplish the discoverability, and give a clue as to what Filter Songs Toggle (or whatever) actually means.
  2. I'm really commenting on the more general UX principle here. Rather than having "" mean something, that we then have to explain in help text, it's simpler and clearer I think to just put whatever its current value is right there. The string then demonstrates inherently that it is semicolon-separated, it shows a direct example of what to do, and so it makes it easier to figure out how to extend. The help text could then also be simplified. So, for example, if its value is "patter; singing", rather than putting in "" and explaining in help text that you have to go looking on another tab for what the current value actually is by decoding the first sections of two separate fields, we would just initialize the value in the field to what the current string used is: "patter; singing" (or whatever it is). I think it's fine to use a semicolon-separated string, we just need to initialize it to the value that's actually used, and then let the user take it from there...
mpogue2 commented 5 years ago

Just a thought: should the semicolon-separated string allow something like "all", as in "patter;singing;all", so that I can get out of this mode by hitting ^T one more time? Or, since ESC does that job already, do you think it's good enough? I'm not sure if this is useful enough...and it means that "all" could not be used for a folder name.

Side question: Is this string case-sensitive on case-sensitive file systems? Inquiring minds want to know... :-)

danlyke commented 5 years ago

How does "Toggle Songs Filter" sound? That puts the active verb at the front.

And, yeah, good point on the discoverability/ux thing. We can do that.

What I don't know is a good way to add the "^t^ default (I mean, I did, but that only works if you haven't set preferences, because we didn't set up an erasure mechanism, just a "don't reset defaults if the user made changes").

And we store these things by keypress.

So we either need to individually store a "you were already given a default option for this setting" or a something similar for groups of settings that we can use as we add more.

danlyke commented 5 years ago

I think escape is sufficient.

And search isn't case sensitive.

mpogue2 commented 5 years ago

Hmmm...I think my other comment got lost somewhere...I'll try to remember what I typed!

1) Toggle Songs Filter sounds good to me... 2) I don't understand why adding ^T as the default value for a key doesn't work...I thought they all had defaults that way (except the very newest ones at the bottom of the list)?

danlyke commented 5 years ago

If the user has set any keys, we don't load the default key assignments. This was done because we wanted to allow them to delete key assignments, and when you were thoroughly testing you noticed that, because I was loading the defaults first and then overlaying the key assignments, keys which had not been re-assigned to some other function were coming back.

It's just a matter of thinking it out...

mpogue2 commented 5 years ago

Ah, sou desu ne...(Japanese for "so that's the way it is, isn't it...")

danlyke commented 5 years ago

Sorry @phoef, you might end up having to re-bind a key, 'cause we renamed the action (hopefully one last time). But b1172a3f39265712226793630dd84d488c4986fe fixes Mike's last two issues.

One note while testing this: I tried to test by deleting Ctrl-U, not realizing that that's actually set by a menu, so it's a little hard to nuke off. If you're gonna test how the new defaults work, delete something that's not set in a menu action.

But this also gives us versioned default keys, so that we can add more defaults in the future and they'll just show up before the assigned keys, but then never show up once the user sets the keys for that version.