<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: capture code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Thu, 24 Jul 2008 18:46:32 GMT</pubDate>
    <description>DZone Snippets: capture code</description>
    <item>
      <title>Reference of keyCodes </title>
      <link>http://snippets.dzone.com/posts/show/5320</link>
      <description>&lt;code&gt;&lt;br /&gt;    switch (oEvent.keyCode) {&lt;br /&gt;       case 38: //up arrow  &lt;br /&gt;       case 40: //down arrow&lt;br /&gt;       case 37: //left arrow&lt;br /&gt;       case 39: //right arrow&lt;br /&gt;       case 33: //page up  &lt;br /&gt;       case 34: //page down  &lt;br /&gt;       case 36: //home  &lt;br /&gt;       case 35: //end                  &lt;br /&gt;       case 13: //enter  &lt;br /&gt;       case 9: //tab  &lt;br /&gt;       case 27: //esc  &lt;br /&gt;       case 16: //shift  &lt;br /&gt;       case 17: //ctrl  &lt;br /&gt;       case 18: //alt  &lt;br /&gt;       case 20: //caps lock&lt;br /&gt;       case 8: //backspace  &lt;br /&gt;       case 46: //delete&lt;br /&gt;           return true;&lt;br /&gt;           break;&lt;br /&gt;&lt;br /&gt;       default: &lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Note: When capturing combination keys there is dedicated boolean attributes for each of the special keys (CTRL, SHIFT, ALT).&lt;br /&gt;Reference: &lt;a href="http://www.sitepoint.com/article/life-autocomplete-textboxes/3"&gt;Make Life Easy With Autocomplete Textboxes [JavaScript &amp; AJAX Tutorials]&lt;/a&gt; [sitepoint.com]</description>
      <pubDate>Wed, 02 Apr 2008 22:31:34 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/5320</guid>
      <author>jrobertson (James Robertson)</author>
    </item>
    <item>
      <title>Python - Mouse Capture</title>
      <link>http://snippets.dzone.com/posts/show/2021</link>
      <description>// Minimo Esempio di pannello con evento&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;import wx&lt;br /&gt;&lt;br /&gt;class MyFrame(wx.Frame):&lt;br /&gt;    &lt;br /&gt;    def __init__(self):&lt;br /&gt;        &lt;br /&gt;        # creo un frame&lt;br /&gt;        wx.Frame.__init__(self, None, -1, 'My Frame', size=(300, 300))&lt;br /&gt;        # aggiungo un pannello&lt;br /&gt;        panel = wx.Panel(self, -1)&lt;br /&gt;        # aggiungo un evento al pannello&lt;br /&gt;        panel.Bind(wx.EVT_MOTION, self.OnMove)&lt;br /&gt;        # aggiungo un controllo di testo&lt;br /&gt;        self.posCtrl = wx.TextCtrl(panel, -1, 'Pos: ', pos=(40, 10))&lt;br /&gt;        &lt;br /&gt;    def OnMove(self, event):&lt;br /&gt;        &lt;br /&gt;        # catturo la posizione del mouse&lt;br /&gt;        pos = event.GetPosition()&lt;br /&gt;        # scrivo tale posizione nel controllo di testo&lt;br /&gt;        self.posCtrl.SetValue('%s, %s' % (pos.x, pos.y))&lt;br /&gt;        &lt;br /&gt;if '__main__' == __name__:&lt;br /&gt;    &lt;br /&gt;    app = wx.PySimpleApp()&lt;br /&gt;    frame = MyFrame()&lt;br /&gt;    frame.Show()&lt;br /&gt;    app.MainLoop()&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Mon, 15 May 2006 01:59:29 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/2021</guid>
      <author>whitetiger ()</author>
    </item>
    <item>
      <title>taking a screenshot</title>
      <link>http://snippets.dzone.com/posts/show/398</link>
      <description>In py_s60 1.1.0, we can take a screenshot using camera module.&lt;br /&gt;In 1.1.3, however, the feature is moved to the new graphics module.&lt;br /&gt;&lt;br /&gt;Here's a quick example.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;import graphics&lt;br /&gt;im = graphics.screenshot()&lt;br /&gt;im.save(u'C:\\test.png')&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;You may notice the difference. Now you can save it in 'jpg' or 'png'&lt;br /&gt;as you like by specifying the filename.</description>
      <pubDate>Sun, 19 Jun 2005 22:28:13 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/398</guid>
      <author>korakot (Korakot Chaovavanich)</author>
    </item>
  </channel>
</rss>
