mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 10:25:37 +00:00
Revert "ui/app: (iOS) treat the \n character as a return key chord"
It's not the way of the soft keyboards.
This reverts commit a0c04cb3b2.
This commit is contained in:
+4
-9
@@ -152,16 +152,11 @@ func onDeleteBackward(view C.CFTypeRef) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//export onText
|
//export onText
|
||||||
func onText(view C.CFTypeRef, cstr *C.char) {
|
func onText(view C.CFTypeRef, str *C.char) {
|
||||||
w := views[view]
|
w := views[view]
|
||||||
str := C.GoString(cstr)
|
w.w.event(key.EditEvent{
|
||||||
if str != "\n" {
|
Text: C.GoString(str),
|
||||||
w.w.event(key.EditEvent{
|
})
|
||||||
Text: str,
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
w.onKeyCommand(key.NameReturn)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//export onTouch
|
//export onTouch
|
||||||
|
|||||||
Reference in New Issue
Block a user