Skype for Business - Disable "ESC" Keyboard Shortcut
Someone asked this question already but regarding CTRL+ENTER shortcut or CTRL+SHIFT+ENTERer (post Disable control+enter when typing a message in Lync). This is a follow up on that question.
In Skype for Business (was: lync), is it possible to stop the ESC key from closing a conversation or a tab in the conversation?
I assume there is a similar method as shown in the linked question, but I don't have the key value to use for ESC. Does anyone have it?
I could not find the value for ESC key to put in the DisabledShortcutKeysCheckBoxes, too. I think that the method of using following AutoHotKey serves as a reference.
Disable Escape key in Office Communicator 2007 https://social.technet.microsoft.com/Forums/lync/en-US/f59f12e4-3073-444d-8084-31766cab4756/disable-escape-key-in-office-communicator-2007?forum=ocsclients
The script code:
; stop the stupid ESC closing behavour of the IM windows
#IfWinActive ahk_class LyncConversationWindowClass
Escape::return
#IfWinActive
I could disable the escape key behavior via the registry key, when using SfB 16.0 x64. [Note that this doesn't seem to work if you're using Skype for Business Basic]
Under HKCU\Software\Policies\Microsoft\Office\16.0\Lync\DisabledShortcutKeysCheckBoxes
:
- String Name:
Escape
(or whatever you want) - String Value:
27,0
The downside is that Esc is now disabled throughout the entire SfB app. For example, if you open a menu via Alt+F, you cannot hit Esc to close it, like you could before. IMO, it's worth it.
Extra info: The other post you linked revealed the format of the string value, which appears to be:
KeyCodeDec,Modifiers
KeyCodeDec seems to map to this list of virtual keys when converted to decimal values.
With some experimentation, I've found that the modifiers are:
-
4
for Shift -
8
for Ctrl -
16
for Alt
You can disable pretty much any key, it seems. 70,16
is Alt+F, 67,0
will prevent you from typing c in your chats, but will still allow Shift+C.
Updated Autohotkey script for Skype. This prevents escape key from closing the chat.
; stop the stupid ESC closing behavour of the IM windows
#IfWinActive ahk_class LyncTabFrameHostWindowClass
Escape::return
#IfWinActive
In AutoHotKey, if you right-click the taskbar icon and select "Window Spy", then click the Skype window, it will show you the akh_class name.