mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-08-03 14:18:45 +00:00
feat: shoutcut no repeat
This commit is contained in:
parent
c6c5124831
commit
99a78c7f50
1 changed files with 17 additions and 0 deletions
|
@ -189,6 +189,7 @@ void VideoForm::installShortcut()
|
||||||
|
|
||||||
// switchFullScreen
|
// switchFullScreen
|
||||||
shortcut = new QShortcut(QKeySequence("Ctrl+f"), this);
|
shortcut = new QShortcut(QKeySequence("Ctrl+f"), this);
|
||||||
|
shortcut->setAutoRepeat(false);
|
||||||
connect(shortcut, &QShortcut::activated, this, [this]() {
|
connect(shortcut, &QShortcut::activated, this, [this]() {
|
||||||
if (!m_device) {
|
if (!m_device) {
|
||||||
return;
|
return;
|
||||||
|
@ -198,14 +199,17 @@ void VideoForm::installShortcut()
|
||||||
|
|
||||||
// resizeSquare
|
// resizeSquare
|
||||||
shortcut = new QShortcut(QKeySequence("Ctrl+g"), this);
|
shortcut = new QShortcut(QKeySequence("Ctrl+g"), this);
|
||||||
|
shortcut->setAutoRepeat(false);
|
||||||
connect(shortcut, &QShortcut::activated, this, [this]() { resizeSquare(); });
|
connect(shortcut, &QShortcut::activated, this, [this]() { resizeSquare(); });
|
||||||
|
|
||||||
// removeBlackRect
|
// removeBlackRect
|
||||||
shortcut = new QShortcut(QKeySequence("Ctrl+w"), this);
|
shortcut = new QShortcut(QKeySequence("Ctrl+w"), this);
|
||||||
|
shortcut->setAutoRepeat(false);
|
||||||
connect(shortcut, &QShortcut::activated, this, [this]() { removeBlackRect(); });
|
connect(shortcut, &QShortcut::activated, this, [this]() { removeBlackRect(); });
|
||||||
|
|
||||||
// postGoHome
|
// postGoHome
|
||||||
shortcut = new QShortcut(QKeySequence("Ctrl+h"), this);
|
shortcut = new QShortcut(QKeySequence("Ctrl+h"), this);
|
||||||
|
shortcut->setAutoRepeat(false);
|
||||||
connect(shortcut, &QShortcut::activated, this, [this]() {
|
connect(shortcut, &QShortcut::activated, this, [this]() {
|
||||||
if (!m_device) {
|
if (!m_device) {
|
||||||
return;
|
return;
|
||||||
|
@ -215,6 +219,7 @@ void VideoForm::installShortcut()
|
||||||
|
|
||||||
// postGoBack
|
// postGoBack
|
||||||
shortcut = new QShortcut(QKeySequence("Ctrl+b"), this);
|
shortcut = new QShortcut(QKeySequence("Ctrl+b"), this);
|
||||||
|
shortcut->setAutoRepeat(false);
|
||||||
connect(shortcut, &QShortcut::activated, this, [this]() {
|
connect(shortcut, &QShortcut::activated, this, [this]() {
|
||||||
if (!m_device) {
|
if (!m_device) {
|
||||||
return;
|
return;
|
||||||
|
@ -224,6 +229,7 @@ void VideoForm::installShortcut()
|
||||||
|
|
||||||
// postAppSwitch
|
// postAppSwitch
|
||||||
shortcut = new QShortcut(QKeySequence("Ctrl+s"), this);
|
shortcut = new QShortcut(QKeySequence("Ctrl+s"), this);
|
||||||
|
shortcut->setAutoRepeat(false);
|
||||||
connect(shortcut, &QShortcut::activated, this, [this]() {
|
connect(shortcut, &QShortcut::activated, this, [this]() {
|
||||||
if (!m_device) {
|
if (!m_device) {
|
||||||
return;
|
return;
|
||||||
|
@ -233,6 +239,7 @@ void VideoForm::installShortcut()
|
||||||
|
|
||||||
// postGoMenu
|
// postGoMenu
|
||||||
shortcut = new QShortcut(QKeySequence("Ctrl+m"), this);
|
shortcut = new QShortcut(QKeySequence("Ctrl+m"), this);
|
||||||
|
shortcut->setAutoRepeat(false);
|
||||||
connect(shortcut, &QShortcut::activated, this, [this]() {
|
connect(shortcut, &QShortcut::activated, this, [this]() {
|
||||||
if (!m_device) {
|
if (!m_device) {
|
||||||
return;
|
return;
|
||||||
|
@ -242,6 +249,7 @@ void VideoForm::installShortcut()
|
||||||
|
|
||||||
// postVolumeUp
|
// postVolumeUp
|
||||||
shortcut = new QShortcut(QKeySequence("Ctrl+up"), this);
|
shortcut = new QShortcut(QKeySequence("Ctrl+up"), this);
|
||||||
|
shortcut->setAutoRepeat(false);
|
||||||
connect(shortcut, &QShortcut::activated, this, [this]() {
|
connect(shortcut, &QShortcut::activated, this, [this]() {
|
||||||
if (!m_device) {
|
if (!m_device) {
|
||||||
return;
|
return;
|
||||||
|
@ -251,6 +259,7 @@ void VideoForm::installShortcut()
|
||||||
|
|
||||||
// postVolumeDown
|
// postVolumeDown
|
||||||
shortcut = new QShortcut(QKeySequence("Ctrl+down"), this);
|
shortcut = new QShortcut(QKeySequence("Ctrl+down"), this);
|
||||||
|
shortcut->setAutoRepeat(false);
|
||||||
connect(shortcut, &QShortcut::activated, this, [this]() {
|
connect(shortcut, &QShortcut::activated, this, [this]() {
|
||||||
if (!m_device) {
|
if (!m_device) {
|
||||||
return;
|
return;
|
||||||
|
@ -260,6 +269,7 @@ void VideoForm::installShortcut()
|
||||||
|
|
||||||
// postPower
|
// postPower
|
||||||
shortcut = new QShortcut(QKeySequence("Ctrl+p"), this);
|
shortcut = new QShortcut(QKeySequence("Ctrl+p"), this);
|
||||||
|
shortcut->setAutoRepeat(false);
|
||||||
connect(shortcut, &QShortcut::activated, this, [this]() {
|
connect(shortcut, &QShortcut::activated, this, [this]() {
|
||||||
if (!m_device) {
|
if (!m_device) {
|
||||||
return;
|
return;
|
||||||
|
@ -269,6 +279,7 @@ void VideoForm::installShortcut()
|
||||||
|
|
||||||
// setScreenPowerMode(ControlMsg::SPM_OFF)
|
// setScreenPowerMode(ControlMsg::SPM_OFF)
|
||||||
shortcut = new QShortcut(QKeySequence("Ctrl+o"), this);
|
shortcut = new QShortcut(QKeySequence("Ctrl+o"), this);
|
||||||
|
shortcut->setAutoRepeat(false);
|
||||||
connect(shortcut, &QShortcut::activated, this, [this]() {
|
connect(shortcut, &QShortcut::activated, this, [this]() {
|
||||||
if (!m_device) {
|
if (!m_device) {
|
||||||
return;
|
return;
|
||||||
|
@ -278,6 +289,7 @@ void VideoForm::installShortcut()
|
||||||
|
|
||||||
// expandNotificationPanel
|
// expandNotificationPanel
|
||||||
shortcut = new QShortcut(QKeySequence("Ctrl+n"), this);
|
shortcut = new QShortcut(QKeySequence("Ctrl+n"), this);
|
||||||
|
shortcut->setAutoRepeat(false);
|
||||||
connect(shortcut, &QShortcut::activated, this, [this]() {
|
connect(shortcut, &QShortcut::activated, this, [this]() {
|
||||||
if (!m_device) {
|
if (!m_device) {
|
||||||
return;
|
return;
|
||||||
|
@ -287,6 +299,7 @@ void VideoForm::installShortcut()
|
||||||
|
|
||||||
// collapseNotificationPanel
|
// collapseNotificationPanel
|
||||||
shortcut = new QShortcut(QKeySequence("Ctrl+Shift+n"), this);
|
shortcut = new QShortcut(QKeySequence("Ctrl+Shift+n"), this);
|
||||||
|
shortcut->setAutoRepeat(false);
|
||||||
connect(shortcut, &QShortcut::activated, this, [this]() {
|
connect(shortcut, &QShortcut::activated, this, [this]() {
|
||||||
if (!m_device) {
|
if (!m_device) {
|
||||||
return;
|
return;
|
||||||
|
@ -296,6 +309,7 @@ void VideoForm::installShortcut()
|
||||||
|
|
||||||
// copy
|
// copy
|
||||||
shortcut = new QShortcut(QKeySequence("Ctrl+c"), this);
|
shortcut = new QShortcut(QKeySequence("Ctrl+c"), this);
|
||||||
|
shortcut->setAutoRepeat(false);
|
||||||
connect(shortcut, &QShortcut::activated, this, [this]() {
|
connect(shortcut, &QShortcut::activated, this, [this]() {
|
||||||
if (!m_device) {
|
if (!m_device) {
|
||||||
return;
|
return;
|
||||||
|
@ -305,6 +319,7 @@ void VideoForm::installShortcut()
|
||||||
|
|
||||||
// cut
|
// cut
|
||||||
shortcut = new QShortcut(QKeySequence("Ctrl+x"), this);
|
shortcut = new QShortcut(QKeySequence("Ctrl+x"), this);
|
||||||
|
shortcut->setAutoRepeat(false);
|
||||||
connect(shortcut, &QShortcut::activated, this, [this]() {
|
connect(shortcut, &QShortcut::activated, this, [this]() {
|
||||||
if (!m_device) {
|
if (!m_device) {
|
||||||
return;
|
return;
|
||||||
|
@ -314,6 +329,7 @@ void VideoForm::installShortcut()
|
||||||
|
|
||||||
// clipboardPaste
|
// clipboardPaste
|
||||||
shortcut = new QShortcut(QKeySequence("Ctrl+v"), this);
|
shortcut = new QShortcut(QKeySequence("Ctrl+v"), this);
|
||||||
|
shortcut->setAutoRepeat(false);
|
||||||
connect(shortcut, &QShortcut::activated, this, [this]() {
|
connect(shortcut, &QShortcut::activated, this, [this]() {
|
||||||
if (!m_device) {
|
if (!m_device) {
|
||||||
return;
|
return;
|
||||||
|
@ -323,6 +339,7 @@ void VideoForm::installShortcut()
|
||||||
|
|
||||||
// setDeviceClipboard
|
// setDeviceClipboard
|
||||||
shortcut = new QShortcut(QKeySequence("Ctrl+Shift+v"), this);
|
shortcut = new QShortcut(QKeySequence("Ctrl+Shift+v"), this);
|
||||||
|
shortcut->setAutoRepeat(false);
|
||||||
connect(shortcut, &QShortcut::activated, this, [this]() {
|
connect(shortcut, &QShortcut::activated, this, [this]() {
|
||||||
if (!m_device) {
|
if (!m_device) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue