I suggest using the methods disableKeyShorcuts() and enableKeyShorcuts(), a good class to watch the implementation might be KeywordsPopup.java, if you understood how is used there you should success in use in rename.
https://github.com/openkm/document-mana ... Popup.java