-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Library: add keyboard short to open track properties Ctrl+Enter #4347
Conversation
Why do you pick exactly Ctrl+Enter |
Oh I just.. just tried it here and it is the short cut for the comment button. |
The original report suggests CTRL+i which is used in VLC player to show the metadata of the playing track and in iTunes the info of the selected track and takes a screenshot in Windows Media Player. Did you consider to use Ctrl+i instead? |
I picked
I'd rather not look at how unrelated apps use the key. |
The shortcut is now displayed in the track menu, at least in the tracks table menu which is sufficient. |
b88865d
to
32c835e
Compare
32c835e
to
a2e5373
Compare
src/widget/wtrackmenu.cpp
Outdated
// when the menu is invoked from the tracks table. | ||
// The actual shortcut is set in WTrackTableView::keyPressEvent | ||
if (m_pTrackModel) { | ||
m_pPropertiesAct->setShortcut(QKeySequence(tr("Ctrl+Return"))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think QKeySequence has translation under the hood, no need for() tr here.
Is there a common header where we can move it to? This allows to define it only in a single place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, QKeySequence(Qt::CTRL + Qt::Key_Return)
works, too.
I'd appreciate to have one place for those shortcuts, sure. defs_urls.h
could work, but then we'd need to complicate WTrackTableView::keyPressEvent
to look it up, too.
Though I wonder if it's worth the hassle considering it's about one shortcut only (maybe also Del
from #4330).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've put it in util/defs.h, okay?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
src/widget/wtracktableview.cpp
Outdated
} else { | ||
QTableView::keyPressEvent(event); | ||
// If Ignore all Enter combos if any cell editor is open | ||
if (event->key() == Qt::Key_Return && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unlike many other keys Qt::Key_Return does not reach this function it is already used for
[PreviewDeck1],start_stop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh. I had a custom kbd config in place which didn't contain this shortcut. also it does not work when I have no kbd config in .mixxx that contains it and start mixxx from the build directory. strange..
And it needs to be added to the keyboard shortcut PDF/image.
Anyway, then let's not use it. We could argue if Return
is maybe better used for the double click action, not for the preview deck, but that doesn't need to happen here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could argue if Return is maybe better used for the double click action
I can confirm that.
c859196
to
68c8941
Compare
68c8941
to
8a7c4b0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can confirm it works now as desired on a German Ubuntu Focal.
LGTM. Thank you.
https://bugs.launchpad.net/mixxx/+bug/1393357
In the tracks table press
Ctrl
+Return
to show the Track Properties dialog for the selected track.The shortcut is displayed in the track context menu (only when invoked from the tracks table).