[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] Porting nano to my own OS (Issue with curses)
From: |
David Ramsey |
Subject: |
Re: [Nano-devel] Porting nano to my own OS (Issue with curses) |
Date: |
Sun, 30 Sep 2007 18:50:12 -0500 |
On 9/20/07, bluecode <address@hidden> wrote:
> Hello nano developers,
>
> I have been trying to port nano to my OS for quite some time now.
> Therefore I had to write my own curses library. I am stuck right now:
> Most things work (editing text etc.), but I can't figure out how
> curses is supposed to communicate a keypress of Ctrl (e.g. Crtl+x to
> exit nano, Ctrl+o to save the file) to nano. I have consulted the
> Single Unix Specification, but it left me pretty much clueless on that
> issue. Google did not help either. So I thought I ask you guy, since
> you know nano's internals best.
>
> Thanks for reading & replying.
If I understand your problem correctly, the control keys are equivalent
to ASCII codes 0 to 31, as well as ASCII code 127. As for which codes
correspond to which keys, the NANO_CONTROL_[whatever] definitions in
nano.h should tell you. So if you check for those values, things should
work.