Path: csiph.com!usenet.pasdenom.info!news.albasani.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "J.O. Aho" Newsgroups: comp.lang.php Subject: Re: ncurses on Linux how to capture F1 key? Date: Mon, 30 Jul 2012 18:27:22 +0200 Lines: 35 Message-ID: References: <591cbfc9-6e5f-497d-b84d-c225c1fbbce9@googlegroups.com> <50a5726e-f706-4a98-8f47-e6644422f14f@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net xNcp6UZ+s8oBbWj2vkbe1wQ1zXLkEhl7T2C3JfmalYz75hHaxBLi57p5Mem913u1XW Cancel-Lock: sha1:cifXnQKSWkZ3BCU8KhWfnkeJGzg= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120613 Thunderbird/13.0 In-Reply-To: Xref: csiph.com comp.lang.php:6693 On 30/07/12 13:07, crankypuss wrote: > On 07/29/2012 05:31 AM, J.O. Aho wrote: >> There is a short article in the devzone how to use ncurses, the code >> there has no issues with function keys. > > I assume you are referring to: > http://devzone.zend.com/173/using-ncurses-in-php/ > > I notice all the clever line-through semi-corrections there, very cute. > In short, it's pablum. It fails to even *address* the idea of > function keys, and doesn't mention little details like > extended-attributes clashing with user-defined colors. If you do check for which value the variable $y has and compare with the value which ncurses thinks a F1 key has (see the key const documentation). If you still have issues, then see to that your DE don't capture the key. > So you think I should post the 6700+ lines of partially complete > interface code I've written to deal with ncurses in civilized fashion, > plus the dozens (or hundreds) of support routines, *AND* the application > code on top of that so you can whine about excessive information instead > of just answering the question asked or ignoring it and going about your > business? Not going to happen here, suck it up and deal. Still your key capturing part of the application ain't 100% of the code base, but if you want to paste everything there is pastebin.com and just post the link to the paste. -- //Aho