<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
					xmlns:content="http://purl.org/rss/1.0/modules/content/"
					xmlns:wfw="http://wellformedweb.org/CommentAPI/"
					xmlns:atom="http://www.w3.org/2005/Atom"
				  >
<channel>
<atom:link rel="self"  type="application/rss+xml"  href="http://rulinux.net/rss_from_sect_4_subsect_6_thread_38358"  />
<title>rulinux.net - Форум - Development - [C] А как в линуксе проверить нажатие кнопки?</title>
<link>http://rulinux.net/</link>
<description><![CDATA[Портал о GNU/Linux и не только]]></description>
<image><title>rulinux.net - Форум - Development - [C] А как в линуксе проверить нажатие кнопки?</title>
<link>http://rulinux.net/</link>
<url>http://rulinux.net/rss_icon.png</url>
</image>
<item>
<title>Re:[C] А как в линуксе проверить нажатие кнопки?</title>
<link>https://rulinux.net/message.php?newsid=38358&amp;page=1#158181</link>
<guid>https://rulinux.net/message.php?newsid=38358&amp;page=1#158181</guid>
<pubDate>Wed, 14 Nov 2012 16:57:25 +0400</pubDate>
<description><![CDATA[<p><div class="quote"><pre>Normally, the tty driver buffers typed characters until a newline or carriage return  is  typed.   The  cbreak
       routine disables line buffering and erase/kill character-processing (interrupt and flow control characters are
       unaffected), making characters typed by the user immediately available to the program.  The  nocbreak  routine
       returns the terminal to normal (cooked) mode.
...
The halfdelay routine is used for half-delay mode, which is similar to cbreak mode in that characters typed by
       the  user are immediately available to the program.  However, after blocking for tenths tenths of seconds, ERR
       is returned if nothing has been typed.  The value of tenths must be a number between 1 and 255.  Use  nocbreak
       to leave half-delay mode.</pre></div>
<br>
<br>
С уважением,<br>твой man 3 nodelay</p>]]></description>
</item>
<item>
<title>Re:[C] А как в линуксе проверить нажатие кнопки?</title>
<link>https://rulinux.net/message.php?newsid=38358&amp;page=1#158157</link>
<guid>https://rulinux.net/message.php?newsid=38358&amp;page=1#158157</guid>
<pubDate>Wed, 14 Nov 2012 15:48:35 +0400</pubDate>
<description><![CDATA[<p><a href="http://www.opennet.ru/man.shtml?topic=getchar&amp;category=3&amp;russian=0">getchar</a></p>]]></description>
</item>
<item>
<title>Re:[C] А как в линуксе проверить нажатие кнопки?</title>
<link>https://rulinux.net/message.php?newsid=38358&amp;page=1#158143</link>
<guid>https://rulinux.net/message.php?newsid=38358&amp;page=1#158143</guid>
<pubDate>Wed, 14 Nov 2012 15:00:04 +0400</pubDate>
<description><![CDATA[<p><a href="http://stackoverflow.com/questions/448944/c-non-blocking-keyboard-input">Там</a> есть пара вариантов. С select, сигналами или ncurses.</p>]]></description>
</item>
<item>
<title>[C] А как в линуксе проверить нажатие кнопки?</title>
<link>https://rulinux.net/message.php?newsid=38358&amp;page=1#158138</link>
<guid>https://rulinux.net/message.php?newsid=38358&amp;page=1#158138</guid>
<pubDate>Wed, 14 Nov 2012 14:30:57 +0400</pubDate>
<description><![CDATA[<p>И чтобы при этом программа не останавливалась на ожидание нажатия. Помню в DOS-е я делал так:<br><br><fieldset><legend>c</legend><code><br />
<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span>getch<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">!=</span><span style="color: #0000dd;">27</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
<span style="color: #666666; font-style: italic;">// делай что угодно</span><br />
<span style="color: #009900;">&#125;</span><br />
&nbsp;</code></fieldset><br><br>и программа по ESC выходила из этого бесконечного цикла. А в линуксе такое не работает, даже с ncurses-овским getch() - каждый шаг цикла ждёт нажатия кнопки и не продолжает выполнение, пока не нажмёшь что-нибудь.</p>]]></description>
</item>
</channel>
</rss>