A setting to control this behavior should be available in the Settings dialog. I prefer to completely ignore this key binding, but the setting should also provide a behavior to this key binding that close the current chat session, instead of exit the program.
The whole Telegram program exited.
Operating system:
Debian GNU/Linux 8
Version of Telegram Desktop:
1.1.10
Used theme:
Default
Logs:
[15:32:30.844 00-0000713] Waiting for taskThread to finish (localimageloader.cpp : 128)
[15:32:32.947 00-0000714] Shortcut event catched: Ctrl+W (mainwindow.cpp : 592)
[15:32:32.949 00-0000715] Session Info: stopping session dcWithShift 5 (session.cpp : 158)
[15:32:32.950 00-0000716] Session Info: marked session dcWithShift 5 as killed (session.cpp : 168)
[15:32:32.950 00-0000717] Waiting for connectionThread to finish (connection.cpp : 281)
[15:32:33.002 00-0000718] Telegram finished, result: 0 (main.cpp : 48)
@Low-power It should just close to tray if the tray icon is available and enabled.
I known the program will not exit if I enabled the tray icon, however I expect the program to exit when I pressing Alt-F4 (that is closing the window).
that close the current chat session, instead of exit the program.
Didn't understand this. You mean what Esc does?
You mean what Esc does?
Yes
@Low-power then just use it
@stek29 You probably misunderstood this issue. I mean I want to disable CTRL-W key binding; I'm not looking for a way to close a chat that Esc does.
Disable for what? Can't you just not press it?
I often press this key binding mistakenly when trying to press CTRL-V, because W is next to V in my keyboard.
Perhaps only make Ctrl+W close the window when it's on the toplevel chat list?
Why does Telegram Desktop need to introduce a non-standard keyboard shortcut to exit it when the functionality already exists in practically every window manager / desktop environment? This should be disabled.
Ctrl+W is a quite common shortcut for closing the current tab/window on many programs.
It is a common shortcut for closing tabs in browsers and by analogy, it should close the chat in TG Desktop. There is not a single application that I know of which uses Ctrl + W to exit.
EDIT: By closing the chat I mean do the same thing as Esc
@Ceda-EI If you press it in a Chrome window with last tab the window is closed. The window is closed in tdesktop as well.
With last tab
You cannot specify a special case and call it common. Also, carrying the analogy, it should do that if I only have 1 chat (analogous to last tab)
@Ceda-EI In tdesktop you always have only one "tab" opened, which is closed by Ctrl+W. If I find time to implement chrome-like tabs in tdesktop, Ctrl+W will close a single tab.
@john-preston No, you don't have only one "tab" opened, you have only one "tab" focused just like you can focus only one tab in browser. Each "chat" is a "tab". Ctrl+W makes no sense in this context. It is best to disable it rather than make it a duplicate of Esc (or disable esc and use that solely to cancel replies and edits and use ctrl+W to leave chat)
Use AHK as workaround
https://github.com/telegramdesktop/tdesktop/issues/3366#issuecomment-299989401 better ticket.
Most helpful comment
Ctrl+W is a quite common shortcut for closing the current tab/window on many programs.