Req #74966 [Fbk->Opn]: No good way to read logical keystrokes & flavoring
| From: | scratch65535 at att dot net | Date: | Sat, 22 Jul 2017 19:42:56 +0000 |
| Subject: | Req #74966 [Fbk->Opn]: No good way to read logical keystrokes & flavoring | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-210201@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
User updated by: scratch65535 at att dot net
Reported by: scratch65535 at att dot net
Summary: No good way to read logical keystrokes & flavoring
-Status: Feedback
+Status: Open
Type: Feature/Change Request
Package: *General Issues
Operating System: irrelevant
PHP Version: 7.1.7
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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