Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKnut Radloff2002-11-01 19:34:44 +0000
committerKnut Radloff2002-11-01 19:34:44 +0000
commit0caff5d62559ca8e1519780a9884ca9181421a4b (patch)
tree1109094fc6d6291eeac50c6025679856bc059fec
parentbe47c812e3c8804817bd44fc3047849ac90b9f89 (diff)
downloadeclipse.platform.swt-0caff5d62559ca8e1519780a9884ca9181421a4b.tar.gz
eclipse.platform.swt-0caff5d62559ca8e1519780a9884ca9181421a4b.tar.xz
eclipse.platform.swt-0caff5d62559ca8e1519780a9884ca9181421a4b.zip
Fixes bug 24493
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
index 0cd401f50d..8abab9a4ef 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
@@ -4985,13 +4985,16 @@ void handleKey(Event event) {
action = getKeyBinding(event.character | event.stateMask);
}
if (action == SWT.NULL) {
- // -ignore any ALT and CTRL key combination except for CTRL + ALT
- // itself which is the Alt Gr key on some keyboards.
+ // -ignore any ALT, SHIFT+ALT, CTRL, SHIFT+CTRL key combination;
+ // Don't ignore CTRL+ALT combinations since that is the Alt Gr
+ // key on some keyboards.
// -ignore anything below SPACE except for line delimiter keys and tab.
// -ignore DEL
- boolean isCtrlAlt = (event.stateMask & (SWT.ALT | SWT.CTRL)) == 0 ||
- event.stateMask == (SWT.ALT | SWT.CTRL);
- if (isCtrlAlt && event.character > 31 && event.character != SWT.DEL ||
+ boolean isCtrlAlt = (event.stateMask ^ SWT.ALT) == 0 ||
+ (event.stateMask ^ SWT.CTRL) == 0 ||
+ (event.stateMask ^ (SWT.ALT | SWT.SHIFT)) == 0 ||
+ (event.stateMask ^ (SWT.CTRL | SWT.SHIFT)) == 0;
+ if (isCtrlAlt == false && event.character > 31 && event.character != SWT.DEL ||
event.character == SWT.CR || event.character == SWT.LF ||
event.character == TAB) {
doContent(event.character);

Back to the top