JDK-8172867 : Dead key sequences do not produce KEY_PRESSED and KEY_TYPED events on Linux.
  • Type: Bug
  • Component: javafx
  • Sub-Component: window-toolkit
  • Affected Version: 8,9
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • OS: linux
  • Submitted: 2017-01-16
  • Updated: 2024-10-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
On Linux dead key typing sequence only send KEY_RELEASED for each key in it. 
For example, diacritic key sequences of French keyboard layout do not trigger listeners added as shown below:

textnode.addEventHandler(KeyEvent.KEY_PRESSED, e -> ...)
textnode.addEventHandler(KeyEvent.KEY_TYPED, e -> ...)
 
Comments
I don't think this is a bug. On Linux and the Mac a dead key combination is handled using the Input Method machinery; the final composed character is delivered as the committed text in an InputMethodEvent. Windows would deliver the same character in a KEY_TYPED KeyEvent instead. There's no spec stating that one is more correct than the other. I don't think this behavior can be made uniform across platforms. The Windows use of KeyEvents is entrenched. The Mac use of InputMethodEvents is also entrenched since it allows JavaFX to reproduce the standard Mac dead key user interface (where the diacritic is previewed before being combined with the following keystroke). Linux provides a subset of the Mac behavior. We should just document that dead key combinations can be delivered as either KeyEvents or InputMethodEvents and leave the implementations as-is.
21-02-2023

+1 (only safe fixes considered this time close to ZBB), not a blocker
03-02-2017

Does it affect 8 GA?
02-02-2017

Quick testing shows that after this fix the https://bugs.openjdk.java.net/browse/JDK-8087477 becomes an issue for Linux too.
31-01-2017

Kevin, Dave, can you please review it?
20-01-2017

http://cr.openjdk.java.net/~ssadetsky/8172867/webrev.00/
18-01-2017

Keys pressed notifications from the dead key combinations reported as consumed by the XFilterEvent(). It seems that logic of glass_window_ime.cpp should explicitly handle dead key typing sequences events to propagate them to FX correctly.
16-01-2017