Ho premuto per sbaglio Ctrl + Shift + W di nuovo e ho perso un po 'di lavoro. Mi piace usare CTRL + W per le singole finestre, ma non voglio mai chiudere tutto. C'è un modo per disabilitare questo su Chrome?
Ho premuto per sbaglio Ctrl + Shift + W di nuovo e ho perso un po 'di lavoro. Mi piace usare CTRL + W per le singole finestre, ma non voglio mai chiudere tutto. C'è un modo per disabilitare questo su Chrome?
Risposte:
Puoi usare AutoHotkey intercettare la scorciatoia da tastiera:
SetTitleMatchMode, Regex
#IfWinActive, (- Google Chrome)$
^+w::
;do nothing
return
#IfWinActive
La risposta di iglvzx non funziona con le versioni più recenti di AutoHotKey (AHK). Ecco come puoi farlo con le nuove versioni di AHK:
SetTitleMatchMode, Regex
#IfWinActive, ahk_class Chrome_WidgetWin_1
^+w::
;do nothing
return
^+q::
;do nothing
return
#IfWinActive
Questo impedisce anche Ctrl + Shift + Q da uscire da Chrome.
+ )
ahk_class a MozillaWindowClass
Versione completa di questo script. Funziona con le nuove versioni di AHK.
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#SingleInstance force;
#KeyHistory 0 ;
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetTitleMatchMode, Regex
#IfWinActive, ahk_class Chrome_WidgetWin_1
^+SC011::
;do nothing
return
^+SC010::
;do nothing
return
#IfWinActive
</pre> etichetta
Ciò vincola ctrl-w per eseguire una sorta di select-word in ogni applicazione e disabilita la chiusura chrome usando ctrl-shift-w e ctrl-shift-q. Testato sui metodi di immissione della lingua inglese e francese per Windows 10.
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
#SingleInstance FORCE
#KeyHistory 0
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
^w:: ; select word
Send, ^{right}^{left}^+{right}
return
SetTitleMatchMode, Regex
#IfWinActive, ahk_class Chrome_WidgetWin_1
^+w::return ; make ctrl-shift-w do nothing
^+q::return ; make ctrl-shift-q do nothing
#IfWinActive
Ecco il codice autohotkey per disabilitare ctrl + w e ctrl + q per la scheda denominata test1 e test2 (test1 è il titolo che appare sulla scheda.Puoi usare anche autohotkey spy per capire altre cose)
SetTitleMatchMode, Regex
#If WinActive("test1 ahk_class Chrome_WidgetWin_1") || WinActive("test2 ahk_class Chrome_WidgetWin_1")
^w::
^q::
return ; do nothing
#IfWinActive
credito a Raj e questo ragazzo
Ctrl+Shift+Qnel Cloud9 IDE , ma questo chiude il mio Chrome :(