当 JVM 启动时,它会加载特定键的当前操作系统键符号映射。当我使用“xmodmap”动态更改操作系统键映射时,JVM 无法识别该更改,并且仍然使用旧的键符号。 如何以编程方式强制 JVM 重新读取操作系统键映射?
最佳答案
Oracle: Troubleshooting guide for java desktop technologies
On UNIX systems that support dynamic keyboard changes, a running Java application does not recognize such a change. For instance, changing the keyboard from US to German does not change the keyboard mapping. Although the X server detects the change and sends out a MappingNotify event to interested clients, AWT does not refresh its notion of the keycode-keysym mapping.
似乎答案是:不是。
关于java - 如何以编程方式强制 JVM 重新读取操作系统键映射?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6843003/