4

I have this problem in which I will accidentally close a pinned tab with cmd+w.

Is there a way to disable closing a tab with the keyboard shortcut and to only make it so that you have to right click + close in order to close the tab?

I'm using Macos but I would like an answer for Windows, MacOs and Linux.

1 Answers1

1

On windows you can use AutoHotKey to catch Crtl-W and require confirmation or ignore, etc. AFAIK there is no way to do it for just pinned tabs. Here's a script I am using. I am not very proficient with AutoHotKey, so there may be a better way to do it. There are other tools like AutoIt as well.

Global bflag
SetTitleMatchMode,2 
bflag = 0
;
; script to verify cntrl-w tab deletion in browers
; 
;#IfWinActive, Notepad
;#IfWinActive, Chrome
GroupAdd browser, Chrome
GroupAdd browser, Firefox
GroupAdd browser, Vivaldi
GroupAdd browser, Opera
GroupAdd browser, Edge
; for testing
; GroupAdd browser, Notepad

#IfWinActive ahk_group browser

^w:: SplashTextOn, 1000, 50, Delete, press DELETE to confirm or escape Suspend, ON Input, SingleKey, L1 T1, {Del}{Escape} SplashTextOff IfInString, ErrorLevel, Del Send ^w Suspend, OFF Return

; End

excel
  • 11