src/share/classes/sun/awt/SunToolkit.java
Print this page
@@ -1124,10 +1124,20 @@
public int getFocusAcceleratorKeyMask() {
return InputEvent.ALT_MASK;
}
/**
+ * Tests whether specified key modifiers mask can be used to enter a printable
+ * character. This is a default implementation of this method, which reflects
+ * the way things work on Windows: here, pressing ctrl + alt allows user to enter
+ * characters from the extended character set (like euro sign or math symbols)
+ */
+ public boolean isPrintableCharacterModifiersMask(int mods) {
+ return ((mods & InputEvent.ALT_MASK) == (mods & InputEvent.CTRL_MASK));
+ }
+
+ /**
* Returns a new input method window, with behavior as specified in
* {@link java.awt.im.spi.InputMethodContext#createInputMethodWindow}.
* If the inputContext is not null, the window should return it from its
* getInputContext() method. The window needs to implement
* sun.awt.im.InputMethodWindow.