Finer Grained Control of Edit End

Tags: #<Tag:0x00007f8b285922d8>

I’m trying to figure out what I can hook into to get finer grained control of when an edit operation is ended.

By default the keypress ENTER on the table will start an edit operation - and ENTER also ends it.

I’m wanting start the edit operation with ENTER but then end it with CMD+Enter. Any ideas how or what I might hook into to get that kind of override control?

Thanks.

That’s an interesting challenge.

The key combination should not be a problem. You’d just need to track down keyCodes, however, the process of blocking and activating the editor might take some investigation. It is a bunch of events to track.

Then you can check if the editor is already opened by calling hot.getActiveEditor()._opened (it’s not an official API so be careful with that). After you get true you know that you should block ENTER and use close() to close it up after you get ENTER + CMD key combination.

Cool - thanks, that gives me a good foundation to go on. Cheers!

I keep my fingers crossed but if you’d stumble upon any issues feel free to leave a comment and we’ll discuss it.

1 Like

Done! All good - thanks @aleksandra_budnik

1 Like