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 » Sun 21 Aug, 2016 15:52

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: 8074
Joined: Tue 30 Aug, 2005 17:21
Location: Санкт-Петербург
Has thanked: 67 times
Been thanked: 100 times

Disable file execution by ENTER button

Post by HaRT » Sun 21 Aug, 2016 16:14

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 » Thu 15 Sep, 2016 20:53

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: 3004
Joined: Mon 07 Sep, 2009 10:40
Has thanked: 2 times
Been thanked: 82 times

Disable file execution by ENTER button

Post by 2useven10 » Thu 15 Sep, 2016 22:45

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

Post Reply

Return to “General Discussions”