Disable file execution by ENTER button

You want to talk about Far Manager, but don't know where to turn?
Post Reply
astonu
Posts: 2
Joined: Sun 21 Aug, 2016 15:48

Disable file execution by ENTER button

Post 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?
User avatar
HaRT
Moderator
Posts: 10822
Joined: Tue 30 Aug, 2005 17:21
Has thanked: 221 times
Been thanked: 358 times

Disable file execution by ENTER button

Post 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.
Фар есть инструмент, а не нянька. © 2009 DrKnS
astonu
Posts: 2
Joined: Sun 21 Aug, 2016 15:48

Disable file execution by ENTER button

Post 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="";
}
2useven10
Posts: 5204
Joined: Mon 07 Sep, 2009 10:40
Has thanked: 18 times
Been thanked: 310 times

Disable file execution by ENTER button

Post by 2useven10 »

astonu,
You can create one file %FARPROFILE%\Macros\scripts\
Post Reply

Return to “General Discussions”