Page 1 of 1

Disable file execution by ENTER button

Posted: Sun 21 Aug, 2016 15:52
by astonu
Is it possible to disable file execution by ENTER and SHIFT+ENTER keyboard buttons?
I don't want to allow FAR to run any file.
I just want to view them by F3-button, or by applications from FAR Menu (F2)

Any suggestions how to do it?

Disable file execution by ENTER button

Posted: Sun 21 Aug, 2016 16:14
by HaRT
astonu, the easiest way is to record (and save) a keyboard macro for each of these keys which only performs its action for folders: use CtrlShift. to start/finish recording, set [x] Execute for folders. Read Help and CHM manual on macros ([i][b]%FarHome%\Encyclopedia\macroapi_manual.en.chm[/b][/i]) for more info.

Disable file execution by ENTER button

Posted: Thu 15 Sep, 2016 20:53
by astonu
Thanks, It works.
I leave it here, in case I will forgot:

To disable these two hot keys you need to create two files in %USERPROFILE%\AppData\Roaming\Far Manager\Profile\Macros\internal

Shell_Enter.lua

Code: Select all

Macro {
  description="BlockEnter";
  area="Shell"; key="Enter";
  flags="NoFolders";
  code="";
}
Shell_ShiftEnter.lua

Code: Select all

Macro {
  description="BlockShiftEnter";
  area="Shell"; key="ShiftEnter";
  flags="NoFolders";
  code="";
}

Disable file execution by ENTER button

Posted: Thu 15 Sep, 2016 22:45
by 2useven10
astonu,
You can create one file %FARPROFILE%\Macros\scripts\