Req #74966 [Opn]: No good way to read logical keystrokes & flavoring

From: Date: Sat, 22 Jul 2017 19:56:35 +0000
Subject: Req #74966 [Opn]: No good way to read logical keystrokes & flavoring
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-210202@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74966&edit=1 ID: 74966 Updated by: requinix@php.net Reported by: scratch65535 at att dot net Summary: No good way to read logical keystrokes & flavoring Status: Open Type: Feature/Change Request -Package: *General Issues +Package: Unknown/Other Function Operating System: irrelevant PHP Version: 7.1.7 Block user comment: N Private report: N New Comment: So... you want to make an editor in PHP? That runs from the command line, like vim or emacs? I guess reading keyboard state is alright, but that sounds like a job for a PECL extension (if there isn't already one that can do it). Previous Comments: ------------------------------------------------------------------------ [2017-07-22 19:42:52] scratch65535 at att dot net In JS, an event is triggered when a key is pressed, and we can read the logical value including the state of flavoring keys. So if I'm writing an editor or similar (which in fact I am at the moment, and which is what prompted my wishlist post), I can use whatever keypresses I like to invoke various functions. That's very straightforward: just look at the event struct and it's all there. There's no horsing around with fgetc() on STDIN, flushing buffers, et tedious cetera, which (afaiaa) is what must be done with php. So right now I'm writing the editor in a mix of js to do the human-factors and php to talk to the disk. It's be much nicer if it were all doable in php. ------------------------------------------------------------------------ [2017-07-22 06:39:16] requinix@php.net What are you talking about? ------------------------------------------------------------------------ [2017-07-21 22:08:22] scratch65535 at att dot net Description: ------------ There seems to be no clean, simple way to read logical keypresses and their non-printing flavoring keys (Ctrl, Shift, etc.) Being able to read individual keystrokes without having to trick the system is particularly important when writing editors and other interactive tools. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=74966&edit=1

« previous php.bugs (#210202) next »