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
  • I used the exact code above and it worked perfectly. Thanks!
    – fnds
    Feb 27 '17 at 14:20

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 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.

  • This is excellent. Unfortunately, it doesn't work in the situation which highlights the shared screen toolbar: <kbd>Ctrl</kbd><kbd>Shift</kbd><kbd>Space</kbd> with 32,12, (or with 0, 4, 8, or 12). It seems this is built into the application a different way. I guess I'll need another dang AHK script. Nov 1 '17 at 17:44

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

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.