mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 01:45:36 +00:00
ui/app: (iOS) treat the \n character as a return key chord
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+9
-4
@@ -148,11 +148,16 @@ func onDeleteBackward(view C.CFTypeRef) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//export onText
|
//export onText
|
||||||
func onText(view C.CFTypeRef, str *C.char) {
|
func onText(view C.CFTypeRef, cstr *C.char) {
|
||||||
w := views[view]
|
w := views[view]
|
||||||
w.w.event(key.EditEvent{
|
str := C.GoString(cstr)
|
||||||
Text: C.GoString(str),
|
if str != "\n" {
|
||||||
})
|
w.w.event(key.EditEvent{
|
||||||
|
Text: str,
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
w.onKeyCommand(key.NameReturn)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//export onTouch
|
//export onTouch
|
||||||
|
|||||||
Reference in New Issue
Block a user