Summary: | Alt+{char} gets inserted as text | ||
---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Nick Edgar <n.a.edgar> |
Component: | SWT | Assignee: | Knut Radloff <knut_radloff> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | kai-uwe_maetzel |
Version: | 2.0 | ||
Target Milestone: | 2.0 M6 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Nick Edgar
2002-04-06 21:57:37 EST
This are two issues: a) Handling of Alt-key combinations for looking up menu entries. (Should always be consumed, no action or beep if no associated menu/menu entry could be found.) b) Handling of Alt-key combinations received by the StyledText. (Should allow to enter characters by entering their ascii code while pressing the Alt-key.) Moving to SWT. I do not agree at all that ALT key sequences should always be consumed by SWT, in the general case. Whether or not this would make sense is purely an application level decision. Any application (for example, a game) which wants to deal directly with all keys would be broken if we were to do this. However, StyledText should probably detect the ALT key case and explicitely ignore it, since inserting a "non-ALT-A" into the text would be unexpected behavior. Note: If a key *is* consumed (for example, by a menu accelerator) then this is because of a direct side-effect of an o/s mechanism which would be expected platform behavior. As to the second issue, I just tried this on WinXP (i.e. "ALT-numpad 0-numpad 6-numpad 5" == "A") and it worked. This (o/s provided) mechanism is the only thing which SWT would be expected to support. Anything more than this would, again, be an application specific decision. That is, it may make sense for Eclipse's use of StyledText to provide this, but it probably should not be a generic feature of StyledText. Will ignore Alt key combinations as text input in StyledText. Just noticed the following in 20020416: - Alt+E (open Edit menu) - Z (no item with this mnemonic - it beeps) - Esc to dismiss menu - Esc to dismiss focus on Edit - 'e' gets inserted into editor |