Thread overview | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
April 11, 2011 [Issue 5833] New: To read a key | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=5833 Summary: To read a key Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: bearophile_hugs@eml.cc --- Comment #0 from bearophile_hugs@eml.cc 2011-04-10 23:09:48 PDT --- If not already present, I think it's good to have in std.stdio a portable (on Windows, Linux, etc) and reliable way to read a single char (key press). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
April 11, 2011 [Issue 5833] To read a key | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=5833 kennytm@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kennytm@gmail.com --- Comment #1 from kennytm@gmail.com 2011-04-11 03:03:28 PDT --- You mean like _getch() or just fgetc()? _getch: http://msdn.microsoft.com/en-us/library/078sfkak(v=VS.100).aspx -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
February 25, 2012 [Issue 5833] To read a key | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=5833 hsteoh@quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hsteoh@quickfur.ath.cx --- Comment #2 from hsteoh@quickfur.ath.cx 2012-02-25 11:09:45 PST --- This won't work on Unixen unless you also change the terminal mode to cbreak, because otherwise the terminal doesn't even send the keypress until the end of line. But once you start enabling cbreak, then you have to worry about disabling it, and you start to reinvent ncurses... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
April 19, 2012 [Issue 5833] To read a key | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=5833 SomeDude <lovelydear@mailmetrash.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lovelydear@mailmetrash.com --- Comment #3 from SomeDude <lovelydear@mailmetrash.com> 2012-04-19 07:47:17 PDT --- This hasn't been discussed in the m-l. bearophile, are you ok to close ? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
April 19, 2012 [Issue 5833] To read a key | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=5833 --- Comment #4 from hsteoh@quickfur.ath.cx 2012-04-19 08:10:14 PDT --- We shouldn't close issues unless it's either fixed or is a non-bug. If you think this issue deserves discussion, please start one on the forums. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
April 19, 2012 [Issue 5833] To read a key | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=5833 --- Comment #5 from SomeDude <lovelydear@mailmetrash.com> 2012-04-19 08:31:14 PDT --- Yeah, but this request should have been discussed in the first place by bearophile. Just opening enhancement requests because one thinks this or that should be this way doesn't make any sense. If everybody starts to do that, it will turn to chaos pretty quickly. I'm not the one who opened this enhancement request. I think the author should either ask on the forum, or close it. And if there has been a discussion, a link to it should be given here. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
April 19, 2012 [Issue 5833] To read a key | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=5833 --- Comment #6 from SomeDude <lovelydear@mailmetrash.com> 2012-04-19 08:36:40 PDT --- An example of what I'm talking about is 7939. The guy gives his opinion, without even a debate in the mailing-list. Where does that come from ? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
April 19, 2012 [Issue 5833] To read a key | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=5833 --- Comment #7 from SomeDude <lovelydear@mailmetrash.com> 2012-04-19 08:37:37 PDT --- (In reply to comment #6) > An example of what I'm talking about is 7939. > The guy gives his opinion, without even a debate in the mailing-list. Where > does that come from ? OUps, I meant 7937 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
April 19, 2012 [Issue 5833] To read a key | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=5833 --- Comment #8 from bearophile_hugs@eml.cc 2012-04-19 15:38:00 PDT --- (In reply to comment #3) > This hasn't been discussed in the m-l. I have given a generic answer in Issue 7937 (In reply to comment #5) > Yeah, but this request should have been discussed in the first place by bearophile. Just opening enhancement requests because one thinks this or that should be this way doesn't make any sense. If everybody starts to do that, it will turn to chaos pretty quickly. I think for normal bug reports, or for very small enhancement requests (that require only a small and limited amount of code added or changed with no significant interactions with unrelated user code) discussing it only in Bugzilla is acceptable. And I've seen that most people in newsgroups are not interested in very small things. > bearophile, are you ok to close ? I think that generally it's OK to close an enhancement request when it's not implementable, when it's a bad idea, when there are better ideas, when no one seems to desire the idea for a lot of time, when it asks for too much work for too little gain, etc. In this specific case kennytm and hsteoh have given answers. There is a Windows-specific way to solve this, and on Unixes it's not immediate to do. I am not qualified enough to tell if this enhancement request needs to be closed as WONTFIX. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
April 20, 2012 [Issue 5833] To read a key | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=5833 --- Comment #9 from hsteoh@quickfur.ath.cx 2012-04-19 17:09:26 PDT --- My feeling is that this bug is merely a small part of something much bigger: we need a console-interaction library in Phobos (along the lines of conio.h for windows or ncurses.h for *nixes). I'd prefer to leave this bug open until we either decide that a console interaction library doesn't belong in Phobos, or said library is merged and we can say "use this function from std.console to read a key". -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation