On Tue, May 17, 2016 at 11:40 AM,  <[email protected]> wrote:
> Hey Kevin,
>
> Thanks for the reply.
> I was looking at the package and saw that it uses an external library that
> launches a new terminal window.
> While that seems to do the job, I would still like to programmatically do
> keystroke events in native Julia.
>
> Here's a different question: can I somehow hijack the REPL inputs to Julia
> by writing some kind of C file?
> Keep in mind that I've never done any C programming, but I see that ncurses
> is written in C and it can accept keystrokes in a window other than the REPL
> window.
> Maybe I can do something like that but have my Julia program ccall some
> function and take control of keystroke events.

I don't think hijacking the REPL is the right way to go since a REPL
is a much higher level abstraction compare to what you want to
implement. You should implement a terminal UI at a level that give you
full control of the terminal screen, not on top of a completely
different terminal UI.

You might want to have a look at https://github.com/Keno/TerminalUI.jl
(0.5 only though). @Keno has much more experience with this and he
might even have some other packages for these.

>
>
> Thanks,
> Yousef
>
>
> On Tuesday, May 17, 2016 at 6:10:06 PM UTC+3, Kevin Squire wrote:
>>
>> Hi Yousef,
>>
>> If you're on Linux or OSX (or somehow run an xterm-compatible terminal on
>> Windows), check out https://github.com/tonyhffong/TermWin.jl.
>>
>> I haven't used it myself, but it should give you some or most of the
>> terminal navigation that you want.
>>
>> Cheers,
>>    Kevin
>>
>> On Tue, May 17, 2016 at 7:58 AM, <[email protected]> wrote:
>>>
>>> I've been reading through Julia's initialization and REPL code, but I'm
>>> still confused as to how key strokes signal events to happen.
>>>
>>> To clear up my intention of this knowledge, I would like to be able
>>> navigate command line menus similar to a BIOS for example.
>>> Pressing up would move me to the top button and vice versa down will move
>>> me down.
>>> I would capture the events sent from key strokes and afterwards clear the
>>> screen then reprint with the correct button highlighted.
>>>
>>> I just don't know how to override the default key stroke behaviors or
>>> even how to capture them before the REPL does.
>>> Does Julia even allow this kind of control?
>>> Help would be much appreciated.
>>>
>>> Thanks,
>>> Yousef
>>>
>>>
>>
>

Reply via email to