Attached is a tiny patch to fix the replace shortcut in the query tool.
Regarding international keyboards, there is no way in JS to detect a keyboard layout. CodeMirror also does not handle international keyboards. Neither it provides any way to handle keyboard events differently. I will update the RM with comments.