MultiValue Tools

 View Only

 disable entire screen copy when hit copy key combination with no selection

Jump to Best Answer
Jordy Simpson's profile image
Jordy Simpson posted 04-18-2024 17:51

Is there any way to disable the whole-screen copy when there is no active selection?

When pressing Ctrl-C (or Ctrl-Ins if that's what's defined in settings) with no active selection, the entire screen gets copied. If you then hit Ctrl-V it pastes the entire contents of the screen. This is a big problem because it you accidentally hit Ctrl-C then Ctrl-V when editing, you end up with garbage in your file, and if there was a "fi" on the screen it becomes permanent, requiring restoring from backup.

Example - after the first "12", I intended to hit Ctrl-V to paste in "r/7/9" and instead managed to hit both Ctrl-C and Ctrl-V at the same time, which ended up pasting the contents of the screen and filing some records I had intended to edit that are now in a questionable state. Thankfully this is a tame example and I will be able to correct them without restoring from backup, but it's still frustrating have to do cleanup.

INV01517970

TOP

.12

012 20537

.012 20539

Command ?

..fi

Command ?

.Record 'INV01517044' written to file 'invoice

.INV01518072

Command ?

.TOP

Command ?

..12

Command ?

.012 20537

Command ?

..r/7/9

Command ?

.012 20539

Command ?

..fi

Command ?

.Record 'INV01518072' written to file 'invoice

.INV01518026

Command ?

.TOP

Command ?

..12

Robert Burke's profile image
ROCKETEER Robert Burke Best Answer

You can use the menu designer to override the default action for Edit->Copy (which is called from the shortcut key). The default action will copy the full screen if there is no selection. Always been that way, so would probably break something or upset users to change the behavior. Here’s a script you can use instead of the default action. Just place this script, including the [ and ], in the action field for Edit->Copy:

 

[if activesession.getselection(0,0,0,0) then activesession.copy]

 

You also need to place the same script in the Toolbar Copy button and the context menu Copy item. Else those will have the original default behavior.

Jordy Simpson's profile image
Jordy Simpson

Robert, that worked like a charm, thank you!