mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
app/internal/window: allow punctuation as keycode events
Allows things like "ctrl-{" and ".".
All punctuation is returned as-is, e.g. "!" is "!", not "shift-1", and
"{" is "{", not "shift-[".
Also add the Enter key as a known key (fn-return on my Mac).
Signed-off-by: Larry Clapp <larry@theclapp.org>
This commit is contained in:
+5
-5
@@ -39,12 +39,12 @@ type FocusEvent struct {
|
||||
// An Event is generated when a key is pressed. For text input
|
||||
// use EditEvent.
|
||||
type Event struct {
|
||||
// Name of the key. For letters, the upper case form is used.
|
||||
// Use the Name* constants for special keys suchs as the arrow
|
||||
// keys.
|
||||
// Name of the key. For letters, the upper case form is used, via
|
||||
// unicode.ToUpper. The shift modifier is taken into account, all other
|
||||
// modifiers are ignored. For example, the "shift-1" and "ctrl-shift-1"
|
||||
// combinations both give the Name "!" with the US keyboard layout.
|
||||
Name string
|
||||
// Modifiers is the set of active modifiers when
|
||||
// the key was pressed.
|
||||
// Modifiers is the set of active modifiers when the key was pressed.
|
||||
Modifiers Modifiers
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user