I'm having troubles assigning custom action to EditorTextFied with VK_ESCAPE keyboard shortcut. EditorTextField is used as custom TableCellEditor component inside JBTable.
When I assign different shortcut, eg. SHIFT_DOWN_MASK+VK_ENTER, then action is called. With VK_ESCAPE, my action is not called. Some generic action is done instead and since I resize row and default action cancel selection in table, it throws null pointer exception later in BasicTreeUI.
End goal is to cancel cell editing and call cancelCellEditing() method of my TableCellEditor, which resizes row to previous height and also notifies CellEditorListener to update model/remote server.
When I just select different row, then editings stops correctly (well, calls stopCellEditing() instead of cancelCellEditing(), but at least my shared logic is called and I later know, that it was stopped from outside and consider it as cancel action). I want table/editor to do the same, when user hits ESC key while editing value in EditorTextField.
When I previously used ExtendableTextField as TableCellEditor component, I could assign KeyListener and handle submit/cancel by my own. With EditorTextField, KeyListener approach no longer works.
Any hints will be much appreciated. Thank you.