Annoyance: pressing F4 edit instead of F5 copy

English support forum

Moderators: sheep, Hacker, Stefan2, white

Post Reply
isidro
Junior Member
Junior Member
Posts: 60
Joined: 2006-03-21, 04:39 UTC
Location: argentina

Annoyance: pressing F4 edit instead of F5 copy

Post by *isidro » 2019-01-17, 14:11 UTC

I often find myself using small notebooks keyboards and pressing F4 key when I meant F5. Total Commander should warn if before editing a file bigger than 1mb to avoid long unwanted delays and editor crashing. (ie: want to copy an ISO file). Maybe also if several files are selected.

User avatar
Ovg
Power Member
Power Member
Posts: 575
Joined: 2014-01-06, 16:26 UTC
Location: MOW

Re: Annoyance: pressing F4 edit instead of F5 copy

Post by *Ovg » 2019-01-17, 16:04 UTC

Please only if optional - I don't want this unnecessary extra warning and extra click for usual operation. And 1 mb - negligibly small size
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 9.21a x64, Windows 7 SP1 x64


User avatar
Stefan2
Power Member
Power Member
Posts: 2318
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Annoyance: pressing F4 edit instead of F5 copy

Post by *Stefan2 » 2019-01-17, 18:51 UTC

 
Also you can assign --f.e. Win+F4--
to the F4-command cm_edit
and F4 to command cm_About


Configuration > Options... > Misc.




 

User avatar
Hacker
Moderator
Moderator
Posts: 11133
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Annoyance: pressing F4 edit instead of F5 copy

Post by *Hacker » 2019-01-17, 22:17 UTC

isidro,
Or one can use a simple AutoHotkey script assigned as an editor, like this:

Code: Select all

#NoTrayIcon
FileSizeLimit := 1000000                              ; in bytes
Editor := "C:\Program Files\Notepad2\Notepad2.exe"    ; needs to accept the file name as its command line parameter

FileGetSize, FileSize, %1%
If (FileSize <= FileSizeLimit)
	Run, "%Editor%" "%1%"
HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.

isidro
Junior Member
Junior Member
Posts: 60
Joined: 2006-03-21, 04:39 UTC
Location: argentina

Re: Annoyance: pressing F4 edit instead of F5 copy

Post by *isidro » 2019-01-19, 14:13 UTC

I don't want to change current key usage that I'm used to. Just a warning before opening editor for a big file. trigger size could be an option. Usually one never edits a >10mB file.
Obviously this option should be disabled by default so as not to change current behaviour for everyone.

*Hacker » solution is close of what I want, although I could want specifically to edit a bigger file, so it's not a perfect solution. (maybe script could ask?).

User avatar
Hacker
Moderator
Moderator
Posts: 11133
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Annoyance: pressing F4 edit instead of F5 copy

Post by *Hacker » 2019-01-19, 15:21 UTC

isidro,

Code: Select all

#NoTrayIcon
FileSizeLimit := 1000000                              ; in bytes
Editor := "C:\Program Files\Notepad2\Notepad2.exe"    ; needs to accept the file name as its command line parameter

FileGetSize, FileSize, %1%
If (FileSize > FileSizeLimit)
{
	MsgBox, 1, File size limit exceeded, The file size limit has been exceeded:`nLimit: %FileSizeLimit% bytes`nFile size: %FileSize% bytes`nEdit file anyways?
	IfMsgBox, Cancel
		ExitApp
}

Run, "%Editor%" "%1%"
HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.

isidro
Junior Member
Junior Member
Posts: 60
Joined: 2006-03-21, 04:39 UTC
Location: argentina

Re: Annoyance: pressing F4 edit instead of F5 copy

Post by *isidro » 2019-01-23, 14:39 UTC

Thanks Hacker, I would prefer that option within TC, without installing other tools.

User avatar
Stefan2
Power Member
Power Member
Posts: 2318
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Annoyance: pressing F4 edit instead of F5 copy

Post by *Stefan2 » 2019-01-23, 15:00 UTC

isidro wrote:
2019-01-23, 14:39 UTC
without installing other tools.
Just an hint 8) :

Please note that you just need the "AutoHotkey.exe" and the script file.
AutoHotkey is freeware, portable (no install need), small and often used to automate TC and windowsTM also.
Feel free to search the forum or google for "autohotkey" and "ahk" to find out more about.




 

Post Reply