-
Notifications
You must be signed in to change notification settings - Fork 216
Gtk key down up #2138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Gtk key down up #2138
Conversation
|
I’m not sure this suggestion works.
… On May 4, 2019, at 7:12 AM, kusumotonorio ***@***.***> wrote:
@kusumotonorio commented on this pull request.
In basis/ui/backend/gtk/gtk.factor:
> - [ event-modifiers ] [ keyval>> key-sym ] [
- type>> GDK_KEY_PRESS = [ <key-down> ] [ <key-up> ] if
- ] tri ;
-
-: on-key-press/release ( win event user-data -- ? )
- drop swap [ key-event>gesture ] [ window ] bi* propagate-key-gesture t ;
-
+:: key-event>gesture ( event -- key-gesture )
+ event event-modifiers
+ event keyval>> code>sym drop
+ dup integer? not [
+ drop event keyval>> key-sym
+ ] [
+ gdk_keyval_to_unicode 1string f
+ ] if
+ event type>> GDK_KEY_PRESS = [ <key-down> ] [ <key-up> ] if ;
That's good.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
|
Thank you, John. It certainly seems so. |
|
We should review this and merge if it's working! @erg |
|
@kusumotonorio I tried this and it returns Could you please rebase this onto master and see if you can fix it? I will merge sooner next time. Thanks! |
I wrote the cord which fixed key-down/up event issues on gtk backend Factor. It improves:
on key-down/up events.