Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Bernd Paysan
gforth
Commits
0f798e42
Verified
Commit
0f798e42
authored
Apr 02, 2020
by
Bernd Paysan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ekey hook
parent
cc7a4553
Pipeline
#1255
passed with stage
in 11 minutes and 7 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
minos2/linux-gl.fs
minos2/linux-gl.fs
+2
-0
minos2/x11-actors.fs
minos2/x11-actors.fs
+10
-0
No files found.
minos2/linux-gl.fs
View file @
0f798e42
...
...
@@ -583,6 +583,7 @@ Defer >poll-events ( delay -- )
[THEN] ;
Defer looper-hook ( -- ) ' noop is looper-hook
Defer looper-ekey ( -- ) ' noop is looper-ekey
: #looper ( delay -- ) #1000000 *
event-handler @ .?looper-timeouts >poll-events
...
...
@@ -591,6 +592,7 @@ Defer looper-hook ( -- ) ' noop is looper-hook
xpollfds $@ pollfd / xpoll
IF
xpollfds $@ drop revents w@ POLLIN and IF ?events THEN
xpollfds $@ drop pollfd + revents w@ POLLIN and IF looper-ekey THEN
dpy IF
dpy XPending xpollfds $@ drop
[ pollfd 2* ]L + revents w@ POLLIN and or IF get-events THEN
...
...
minos2/x11-actors.fs
View file @
0f798e42
...
...
@@ -93,6 +93,16 @@ DOES> ( x-key [addr] -- ekey )
ELSE
look_key
l
@
x
-
key
>
ekey
#
?
dup
-
IF
top
-
act
?
dup
-
IF
.
ekeyed
ELSE
#
esc
=
level
#
+!
THEN
THEN
THEN
;
x11
-
handler
to
DoKeyPress
here
'
(
key
)
A
,
'
(
key
?)
A
,
A
,
here
AConstant
default
-
in'
:
noname
default
-
in'
ip
-
vector
!@
>
r
ekey
r
>
ip
-
vector
!
ekey
>
xchar
IF
[:
xemit
;]
$
tmp
top
-
act
.
ukeyed
EXIT
THEN
top
-
act
.
ekeyed
;
is
looper
-
ekey
\
'
noop
x11
-
handler
to
DoKeyRelease
:
samepos
?
(
x
y
--
flag
)
lastpos
2
@
rot
-
dup
*
-
rot
-
dup
*
+
samepos
<
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment