You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add new function to Stdib that will get a character from stdin if available or return -1 if not.
Use Case
I want to add keyboard commands to the recently submitted vmatrix example. Currently, there does not appear to be to console input function that does not wait for user input.
Proposed Solution
Add an input function similar to wgetch() from the ncursors lib.
fn input_character_no_wait() int or fn input_character_immediate() int are possible names for this function. If no character is waiting in the input buffer, the function returns -1.
Other Information
No response
Acknowledgements
I may be able to implement this feature request
This feature might incur a breaking change
Version used
V 0.4.6 f6de36d
Environment details (OS name and version, etc.)
V full version: V 0.4.6 8215f21.f6de36d
OS: macos, macOS, 14.5, 23F79
Processor: 8 cpus, 64bit, little endian, Apple M2
Describe the feature
Add new function to
Stdib
that will get a character fromstdin
if available or return -1 if not.Use Case
I want to add keyboard commands to the recently submitted
vmatrix
example. Currently, there does not appear to be to console input function that does not wait for user input.Proposed Solution
Add an input function similar to
wgetch()
from thencursors
lib.fn input_character_no_wait() int
orfn input_character_immediate() int
are possible names for this function. If no character is waiting in the input buffer, the function returns -1.Other Information
No response
Acknowledgements
Version used
V 0.4.6 f6de36d
Environment details (OS name and version, etc.)
V full version: V 0.4.6 8215f21.f6de36d
OS: macos, macOS, 14.5, 23F79
Processor: 8 cpus, 64bit, little endian, Apple M2
getwd: /Users/mike/Documents/github/vmatrix
vexe: /Users/mike/Documents/github/v/v
vexe mtime: 2024-07-07 15:50:01
vroot: OK, value: /Users/mike/Documents/github/v
VMODULES: OK, value: /Users/mike/.vmodules
VTMP: OK, value: /tmp/v_501
Git version: git version 2.45.2
Git vroot status: weekly.2024.27-30-g740be17c (3 commit(s) behind V master)
.git/config present: true
CC version: Apple clang version 15.0.0 (clang-1500.3.9.4)
thirdparty/tcc status: thirdparty-macos-arm64 5c1d002f
Mikes-Air➜ vmatrix ᐅ
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: