-
Notifications
You must be signed in to change notification settings - Fork 59
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
Add keystroke event support and allow adding text lines to the line editor #1040
Conversation
@@ -74,5 +64,3 @@ function process_events(waitfor) | |||
end | |||
|
|||
coro.launch(process_events, catch_events) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use fiber.launch()
now, and pass a name. LuaState::expr()
now detects if a script has imported fiber.lua
, directly or indirectly, and if so it follows up with an implicit fiber.run()
call that runs launched coroutines to completion. But fiber.run()
only knows about coroutines launched with fiber.launch()
.
@@ -71,4 +61,3 @@ function process_events(waitfor) | |||
end | |||
|
|||
coro.launch(process_events, catch_events) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment about fiber.launch()
@@ -2,6 +2,7 @@ XML_FILE_PATH = "luafloater_demo.xml" | |||
|
|||
leap = require 'leap' | |||
coro = require 'coro' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this point you could ditch require 'coro'
too.
@@ -2,6 +2,7 @@ XML_FILE_PATH = "luafloater_gesture_list.xml" | |||
|
|||
leap = require 'leap' | |||
coro = require 'coro' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
require 'coro'
no longer needed.
The script can be signed for 'keystroke' event now.
Added the command for appending text line (text editor) from the script.
Script updates:
Removed
util.contains
which is the same astable.find
in luau;call leap.request() from LUA main thread.