Disable file execution by ENTER button

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

Disable file execution by ENTER button

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

Disable file execution by ENTER button

Postby 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 (%FarHome%\Encyclopedia\macroapi_manual.en.chm) for more info.
Фар есть инструмент, а не нянька. © 2009 DrKnS

astonu
Posts: 2
Joined: Sun 21 Aug, 2016 15:48

Disable file execution by ENTER button

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

Disable file execution by ENTER button

Postby 2useven10 » Thu 15 Sep, 2016 22:45

astonu,
You can create one file %FARPROFILE%\Macros\scripts\
Last edited by 2useven10 on Thu 15 Sep, 2016 22:46, edited 1 time in total.


Return to “General Discussions”

Who is online

Users browsing this forum: No registered users and 1 guest