Bug #867

can't switch between pitch track candidates using keyboard

Added by Matthias Mauch about 10 years ago. Updated about 10 years ago.

Status:ClosedStart date:2014-02-04
Priority:NormalDue date:
Assignee:Rachel Bittner% Done:

100%

Category:-
Target version:-

Description

lovely pitch track candidate switching using edit->"Switch Pitch Candidate", but it doesn't work with either the return or enter keys on OSX (at least not my machine).

History

#1 Updated by Matthias Mauch about 10 years ago

Matthias Mauch wrote:

lovely pitch track candidate switching using edit->"Switch Pitch Candidate", but it doesn't work with either the return or enter keys on OSX (at least not my machine).

... oh, similar story for delete (neither backspace nor delete button work).

#2 Updated by Rachel Bittner about 10 years ago

  • Assignee set to Rachel Bittner

#3 Updated by Matthias Mauch about 10 years ago

For what it's worth, here's my experience (I did this just to make it more usable for me, didn't commit or push or anything).

I changed this line:
https://code.soundsoftware.ac.uk/projects/tony/repository/entry/src/MainWindow.cpp#L538
to contain "d" instead of "Backspace", and that worked for me, but I had to press fn+d (function key plus n) on my Mac for it to work.

Likewise a few lines down I replaced "Return" by "n" (for "next). Same thing, needed to press fn+n to make it work on Mac laptop.

#4 Updated by Chris Cannam about 10 years ago

That is super-weird. If you set it to "n", I would expect to have to hit only "n" regardless of platform.

If you change it to some (hitherto unused) ctrl combination, e.g. Ctrl+Y, what happens? It should get mapped on to Cmd+Y for the Mac -- Qt is supposed to do some automated remapping so that you don't have to define totally separate key modifiers for the separate platforms.

Do the modifier-less shortcuts work for you in Sonic Visualiser? e.g. "m" to add a melodic range spectrogram?

#5 Updated by Chris Cannam about 10 years ago

I finally got to test this on a Mac, and the shortcuts do actually work in my build. That is, the Return key switches the pitch candidate as it should.

My build is using Qt 4 still (4.8.5 to be exact) -- am I right in thinking you are all using Qt 5.x?

#6 Updated by Rachel Bittner about 10 years ago

Chris, I think you've nailed the problem on the head (I'm using Qt 5.2.0)-
http://qt-project.org/forums/viewthread/36174

In summary, it seems like in Qt 5 any single stroke shortcut key is broken.

So, to hackily fix this, how about we just replace "Backspace" with "Ctrl+Backspace" and the same for Return?
I pushed the tiny change to the 2 lines of MainWindow.cpp doing the above.

#7 Updated by Matthias Mauch about 10 years ago

Works for me.

#8 Updated by Rachel Bittner about 10 years ago

  • % Done changed from 0 to 100

#9 Updated by Rachel Bittner about 10 years ago

  • Status changed from New to Resolved

#10 Updated by Chris Cannam about 10 years ago

Thanks for handling that. It looks as if I'm going to have to find some workaround more generally (e.g. continuing to use Qt4 for public builds for the moment, if this isn't easy to fix), as of course there are several other single-key shortcuts in use in SV and Tony.

I did notice the commit shows in the log as being made by "Firstname Lastname" (default setting in a Mercurial UI?) You can set the commit username in the .hgrc file, e.g. mine contains

[ui]
username = Chris Cannam

(including an email address is good practice though -- I tend to leave out mine so I can use the same config regardless of whether I'm "at work" or "doing my own stuff", but that's probably a bad habit on my part)

#11 Updated by Chris Cannam about 10 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF