Esc key window close handling for post-paste cut

Discussion related to "Everything" 1.5 Alpha.
Post Reply
Specular
Posts: 16
Joined: Sat Dec 27, 2014 5:46 am

Esc key window close handling for post-paste cut

Post by Specular »

One interaction flow that has unexpected behavior is the following:

1. A search query is entered in Everything.
2. One or more files are selected then cut (via eg: Ctrl+X), to place them in clipboard.
3. Outside of Everything, in say File Explorer, the files are then pasted to the desired location.
4. Everything window is focused again and Esc key pressed.

In this scenario the window doesn't close when pressing Esc the first time (assuming Keyboard>File | Close Window preference has been already set to Esc (Global)), instead it requires a second press of Esc to do so.

This seems to be because the default Advanced>esc_action is 'Cancel' (ie: cancel any of the actions listed here prior to the user-defined keyboard action occurring). However in the above scenario none of the listed actions are applicable since the paste action has already occurred, so there's nothing left on the clipboard (so one would assume the Everything window would close on the first press).

If there was a way to detect the clipboard was cleared and allow the single Esc press to close the window it'd be appreciated, since the esc_action default of 'Cancel' is still beneficial prior to the paste, to cancel cut items.

Running v1.5.0.1372a (x64), with Everything set to run as service. I'm not aware of anything else manipulating the clipboard.
void
Developer
Posts: 15399
Joined: Fri Oct 16, 2009 11:31 pm

Re: Esc key window close handling for post-paste cut

Post by void »

Thank you for the issue report Specular,

The next alpha update will experiment with OleSetClipboard.

OleSetClipboard will clear the cut items on the clipboard after a successful paste.
Specular
Posts: 16
Joined: Sat Dec 27, 2014 5:46 am

Re: Esc key window close handling for post-paste cut

Post by Specular »

Thanks for considering this!
void
Developer
Posts: 15399
Joined: Fri Oct 16, 2009 11:31 pm

Re: Esc key window close handling for post-paste cut

Post by void »

Everything 1.5.0.1373a adds experimental support for OleSetClipboard.

OleSetClipboard will monitor cut items.
When the cut items are pasted, the clipboard will be cleared.



When you exit Everything, the ole clipboard is flushed.
This means if you:
  • Cut an item in Everything
  • Exit Everything
  • Paste your item in Windows Explorer
  • Windows Explorer will not know the item was 'cut' (it will be treated as copy+paste)
    (same behavior as before)


To disable OleSetClipboard (if you are having troubles cutting+pasting):
  • In Everything 1.5, from the Tools menu, click Options.
  • Click the Advanced tab on the left.
  • To the right of Show settings containing, search for:
    ole
  • Select: ole_set_clipboard
  • Set the value to: false
  • Click OK.


After pasting a cut item, pressing ESC in Everything should now close your window.
Post Reply