Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict between Alt+F4 FAR hotkeys and Windows Terminal #845

Open
Zeroes1 opened this issue May 16, 2024 · 14 comments
Open

Conflict between Alt+F4 FAR hotkeys and Windows Terminal #845

Zeroes1 opened this issue May 16, 2024 · 14 comments

Comments

@Zeroes1
Copy link
Contributor

Zeroes1 commented May 16, 2024

Description of the new feature or improvement

Windows Terminal стал стандартом при запуске консольных приложений в Windows 11, в 10ке тоже пользуется популярностью.

Windows Terminal по дефолту имеет хоткей на Alt+F4 - закрывает WT со всеми вкладками без
предупреждения.

в FAR'e есть тоже хоткеи на Alt+F4:

  1. в настройке ассоциаций: Команда редактирования, выполняемая по Alt+F4:

  2. редактирование меню (F2) в виде текстового файла.

  3. в far:config - редактировать целое значение как двоичное число.

Предложение: как вариант чтобы не ломать существующие хоткеи, добавить альтернативные? [хотя бы для 2 и 3 пункта].

ps. ещё было в MacroBrowser - вызов немодального редактора, но Shmuz уже добавил альтернативу на Shift+F4.

Proposed technical implementation details (optional)

No response

@yegor-mialyk
Copy link
Contributor

While I understand the pain associated with intercepting certain key combinations by WT, I do not think the alternative combinations need to be implemented at the code level. However, it is perfectly fine to have them as macros provided "in the box" (Addons).

The reasons why I think so are:

  • There are many more intercepted key combinations besides Alt+F4 (the most commonly asked one is Ctrl+V).
  • It is possible to redefine keys in WT, including Alt+F4 (via Settings -> Actions).
  • Many users might not even notice that a new key combination has been added to Far Manager.

@Zeroes1
Copy link
Contributor Author

Zeroes1 commented May 17, 2024

@yegor-mialyk
I himsel remove Alt-F4 in WT (very dangerous action i think...), I'm worried about regular users (not advanced or pro)...

@pedjas
Copy link

pedjas commented Jun 26, 2024

While I understand the pain associated with intercepting certain key combinations by WT, I do not think the alternative combinations need to be implemented at the code level.

Well, it would not be alternative as Alt+F4 does not work at all. Function cannot be used at all. Alt+F4 should be set as alternative to new hotkey, as that would still be useful for users that are on older Windows and do not have this issue. But for user on Windows 11 Alt-F4 is useless. It need to be replaced.

* It is possible to redefine keys in WT, including Alt+F4 (via Settings -> Actions).

This is not solution. Option like running external editor should be standard option, without requiring user to customize hotkey.
If there is no other option, different hotkey should be assigned and make it new standard hotkey for the function.

* Many users might not even notice that a new key combination has been added to Far Manager.

Of course they would notice as Alt+F4 does not work so users would search for a solution.

@yegor-mialyk
Copy link
Contributor

I suggested two possible solutions to resolve the issue that exist today. It's fine if you do not like them; you can wait until (and if) an alternative combination is added to Far Manager. Please note, as I mentioned above, Alt+F4 is not the only combination intercepted by WT. Does this mean we should have an alternative for all of them, such as Ctrl+V? What would it be? Ctrl+Shift+V? In all applications under Windows, you use Ctrl+V to paste text, and in Far Manager, you would use Ctrl+Shift+V and call it a solution. I personally disagree.

@pedjas
Copy link

pedjas commented Jun 27, 2024

I suggested two possible solutions to resolve the issue that exist today. It's fine if you do not like them; you can wait until (and if) an alternative combination is added to Far Manager. Please note, as I mentioned above, Alt+F4 is not the only combination intercepted by WT. Does this mean we should have an alternative for all of them, such as Ctrl+V? What would it be? Ctrl+Shift+V? In all applications under Windows, you use Ctrl+V to paste text, and in Far Manager, you would use Ctrl+Shift+V and call it a solution. I personally disagree.

I am not following your reasoning. You say it should stay as it is? As Alt-F4 does not work, functionality of starting external editor should stay unavailable to user?

@shmuz
Copy link
Contributor

shmuz commented Jun 27, 2024

As Alt-F4 does not work, functionality of starting external editor should stay unavailable to user?

A solution exists: add a macro that will send AltF4 to Far.

Macro {
  description="Open external editor";
  area="Shell"; key="AltShiftF4"; -- you can choose another key
  action=function() Keys("AltF4") end;
}

@yegor-mialyk
Copy link
Contributor

There are two options we have today:

  1. Redefine keys in WT via Settings -> Actions
  2. Simple key macro:
Macro {
  description = "Alternative Editor";
  area = "Shell";
  key = "AltE"; -- any combination you want

  action = function()
    Keys("AltF4")
  end;
}

My original suggestion was to add such macro into the Far Manager distribution package (Addons)

@yegor-mialyk
Copy link
Contributor

@shmuz our messages have been crossed in wire.

@alabuzhev
Copy link
Contributor

I am not following your reasoning. You say it should stay as it is? As Alt-F4 does not work, functionality of starting external editor should stay unavailable to user?

@pedjas I understand your disappointment, but, realistically, what can we do?
As Yegor already mentioned, Alt+F4 is not the only combination intercepted by WT.

These are default WT actions. I've highlighted conflicting with red and non-conflicting with green:

image

42 conflicts.
And maybe I missed a few.

What shall we do?
Invent 42 new ugly hotkeys (all the nice ones are taken), update the code, all the documentation, all the translations, all the online FAQs, all the forum posts etc., try to learn these new tricks after a quarter of a century, keep doing that again and again every time someone in WT team decides to grab another key for a cool new feature, and after all that get bug reports like "Alt+F4 doesn't work" every now and then anyways for the next 20 years because most of the users couldn't care less about updates and stick to some prehistoric versions for religious reasons and time travel hasn't been invented yet?

@pedjas
Copy link

pedjas commented Jul 3, 2024

42 conflicts. And maybe I missed a few.

What shall we do? Invent 42 new ugly hotkeys (all the nice ones are taken), update the code, all the documentation, all the translations, all the online FAQs, all the forum posts etc., try to learn these new tricks after a quarter of a century, keep doing that again and again every time someone in WT team decides to grab another key for a cool new feature, and after all that get bug reports like "Alt+F4 doesn't work" every now and then anyways for the next 20 years because most of the users couldn't care less about updates and stick to some prehistoric versions for religious reasons and time travel hasn't been invented yet?

Again I do not get it. There are 42 hotkeys set in FarManager that do not work and solution is to leave them as is?!?! They do not work but who cares? It is better to leave them as is, leave them documented, and pretend they can be used although they do not work?

That is really strange reasoning,

One would expect that logical solution is to set alternative hotkeys, no matter how ugly they must be so if "old one" does not work, there is alternative. At least, one would expect that hotkey that does not work would not be presented as such and documented.

Now non working hotkeys are nuisance for options that can be run other way or are insignificant, but external editor can be run only by hotkey. I am sure people would not be bothered if they have to use Alt+Shitf+F4 or whatever hotkey is decided) if Alt+F4 does not work, as that would mean they again can use that option.

This is matter of functionality. It should not be left for user to have to deal with it on his own, by customizing FarManager or Windows on each and every computer they use it on.

@johnd0e
Copy link
Contributor

johnd0e commented Jul 3, 2024

Не стоит недооценивать целевую аудиторию фара, большинство способно решить проблему с шорткатами даже без нашей с Вами помощи.

Но раз у Вас всё же болит душа за них, то почему бы Вам не подготовить предложения для 43 альтернативных хоткеев, оформив их виде макросов, как уже несколько человек выше предлагали?

Замечу также, что тут можно зайти и с обратной стороны, и отучить wt от некоторых хоткеев. Это можно сделать как и из интерфейса, по одному, так и скопом за один раз с помощью скрипта.


Do not underestimate the target audience of the Far, most of them are capable of solving the issue with shortcuts even without our help.

But if you still care about them, why not prepare proposals for 43 alternative hotkeys, formatting them as macros, as several people above have suggested?

I would also like to point out that you can approach this from the opposite side as well, and teach wt to avoid some hotkeys. This can be done both from the interface, one by one, and all at once with the help of a script.

@rohitab
Copy link
Contributor

rohitab commented Jul 3, 2024

But for user on Windows 11 Alt-F4 is useless. It need to be replaced.

Again I do not get it. There are 42 hotkeys set in FarManager that do not work and solution is to leave them as is?!?! They do not work but who cares? It is better to leave them as is, leave them documented, and pretend they can be used although they do not work?

The hotkeys can be used and in fact work just fine on Windows 11 with Windows Console Host. The issue is due to conflicting keys with Windows Terminal. I use Far without Windows Terminal, and haven't had any issues with the default hotkeys.

@pedjas
Copy link

pedjas commented Jul 5, 2024

The hotkeys can be used and in fact work just fine on Windows 11 with Windows Console Host. The issue is due to conflicting keys with Windows Terminal. I use Far without Windows Terminal, and haven't had any issues with the default hotkeys.

That is actually very helpful suggestion. I did not know that classic Console is stil there, just it is not used. Windows Terminal is placed instead.

I handled issue by setting default terminal application to Windows Console Host. Not the best solution but at least it is simple enough.

Alt-F4 works now! Thanks a lot!

For those having similar issues: once Windows Terminal is open, go to it's Settings/Startup and change Default terminal application to Windows Console Host.

If you want to use Console just for Far Manager then you can change path in FarManager icon to:
C:\Windows\System32\conhost.exe "C:\Program Files\Far Manager\Far.exe"

This will also change icon to Console icon, so you have to set that back to FarManager icon.

@pedjas
Copy link

pedjas commented Jul 5, 2024

Do not underestimate the target audience of the Far, most of them are capable of solving the issue with shortcuts even without our help.

It is not poinf of who is caable do to what but about User Experience. Users should no be forced to handle this issue. this should work with clean install.

But if you still care about them, why not prepare proposals for 43 alternative hotkeys, formatting them as macros, as several people above have suggested?

I do not know what all those malfunctioning hotkeys are. Somene else mentioned that number.

I also believe in using apps as they are with as less customizations possible. 40 years of experience tought me that, when you use the same app on several computers, especially if they are not all yours, it is best to stay with defaults.

I would also like to point out that you can approach this from the opposite side as well, and teach wt to avoid some hotkeys. This can be done both from the interface, one by one, and all at once with the help of a script.

This is very strange way to solve this. Disabling Alt-F4 on WT thus crippling it is not a solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants