<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to bugs</title><link href="https://sourceforge.net/p/pyhook/bugs/" rel="alternate"/><link href="https://sourceforge.net/p/pyhook/bugs/feed.atom" rel="self"/><id>https://sourceforge.net/p/pyhook/bugs/</id><updated>2020-02-28T07:38:45.744000Z</updated><subtitle>Recent changes to bugs</subtitle><entry><title>Pyhook crashes when it tries to interpret the window name as ASCII</title><link href="https://sourceforge.net/p/pyhook/bugs/8/" rel="alternate"/><published>2020-02-28T07:38:45.744000Z</published><updated>2020-02-28T07:38:45.744000Z</updated><author><name>Sergio Moreno</name><uri>https://sourceforge.net/u/sergiomoreno/</uri></author><id>https://sourceforge.net2bb7079cd9d73dfa26a2d73313e20a4a3104fb04</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Context: I am developing a mouse and keyboard listener with PyHook.&lt;/p&gt;
&lt;p&gt;Python interpreter: 3.7&lt;/p&gt;
&lt;p&gt;Problem: When I move the mouse over the header Google Chrome browser and the current website is Spotify, I am getting the following error:&lt;/p&gt;
&lt;p&gt;TypeError: MouseSwitch() missing 8 required positional arguments: 'msg', 'x', 'y', 'data', 'flags', 'time', 'hwnd', and 'window_name'.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#6 wrong attribute name in HookManager class(line 255)</title><link href="https://sourceforge.net/p/pyhook/bugs/6/?limit=25#76e1" rel="alternate"/><published>2018-04-28T22:49:29.799000Z</published><updated>2018-04-28T22:49:29.799000Z</updated><author><name>Ryan McCampbell</name><uri>https://sourceforge.net/u/rmccampbell7/</uri></author><id>https://sourceforge.net269e076084da0878c4734853481743c3f04e6fa4</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Can confirm. This also causes an error when the object is deleted. &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#2 Problem with accents (french locale)</title><link href="https://sourceforge.net/p/pyhook/bugs/2/?limit=25#7684/4fcd/61f8" rel="alternate"/><published>2017-05-18T16:37:45.272000Z</published><updated>2017-05-18T16:37:45.272000Z</updated><author><name>Milan Herbig</name><uri>https://sourceforge.net/u/m1lhaus/</uri></author><id>https://sourceforge.net7b7a304dc171cfd3a8f7e98a6f9446e0f849d985</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi, what is it you can't understand. It's a long time a struggled with this. I actually left a pyhook implementation and used pure Python implementation using ctypes and user32.dll library. You can find my hook for global keyboard shortcuts listening here &lt;code&gt;https://github.com/m1lhaus/woofer/blob/master/components/winkeyhook.py&lt;/code&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#2 Problem with accents (french locale)</title><link href="https://sourceforge.net/p/pyhook/bugs/2/?limit=25#7684/4fcd" rel="alternate"/><published>2017-05-14T06:07:24.579000Z</published><updated>2017-05-14T06:07:24.579000Z</updated><author><name>munkhbymba</name><uri>https://sourceforge.net/u/misfi/</uri></author><id>https://sourceforge.net7f20bd8dc34800a881d95fa7e9267a29a0b418bd</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi, i can't understand. Please give me more details Milan Herbig&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#4 Unicode Support</title><link href="https://sourceforge.net/p/pyhook/bugs/4/?limit=25#f095" rel="alternate"/><published>2017-04-27T05:45:12.153000Z</published><updated>2017-04-27T05:45:12.153000Z</updated><author><name>munkhbymba</name><uri>https://sourceforge.net/u/misfi/</uri></author><id>https://sourceforge.net91a803134721b190d9c3e434e08a68f40b22eadd</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;hi &lt;/p&gt;
&lt;p&gt;I need add unicde support. but i cant. What is "We could use the user32.ToUnicode(Ex)"? and where is? &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>KeyboardSwitch and MouseSwitch "missing required positional arguments"</title><link href="https://sourceforge.net/p/pyhook/bugs/7/" rel="alternate"/><published>2017-04-12T12:46:17.471000Z</published><updated>2017-04-12T12:46:17.471000Z</updated><author><name>Erik Bjäreholt</name><uri>https://sourceforge.net/u/erikbjare/</uri></author><id>https://sourceforge.net351848f34b979a0a84e10e1ead1755bfbb3907e2</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;In my application aw-watcher-afk (https://github.com/ActivityWatch/aw-watcher-afk/issues/12) I stumbled upon an issue with KeyboardSwitch and MouseSwitch (https://github.com/ActivityWatch/aw-watcher-afk/issues/12). &lt;/p&gt;
&lt;p&gt;So, I did a quick google and found this:&lt;br/&gt;
&lt;a href="https://stackoverflow.com/questions/26156633/pythoncom-crashes-on-keydown-when-used-hooked-to-certain-applications" rel="nofollow"&gt;https://stackoverflow.com/questions/26156633/pythoncom-crashes-on-keydown-when-used-hooked-to-certain-applications&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Turns out the fix is easy, but the repo seems pretty dead with the last commit in 2008. Any chance to get such a fix merged?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>wrong attribute name in HookManager class(line 255)</title><link href="https://sourceforge.net/p/pyhook/bugs/6/" rel="alternate"/><published>2016-12-11T19:59:56.655000Z</published><updated>2016-12-11T19:59:56.655000Z</updated><author><name>Pedro Ferreira</name><uri>https://sourceforge.net/u/pedalv/</uri></author><id>https://sourceforge.netd87489cdb6b0e7bf128777962e062efbb7a81dc3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;in the &lt;strong&gt;init&lt;/strong&gt; method the attribute key_hook is created and not used by the other hand its used an attribute called keyboard_hook that is not initialized, i belive that they are the same attribute but with different names, so i think its needed to change the key_hook for keyboard_hook or vise versa&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Extended Ascii accent problem</title><link href="https://sourceforge.net/p/pyhook/bugs/5/" rel="alternate"/><published>2016-04-28T00:19:40.746000Z</published><updated>2016-04-28T00:19:40.746000Z</updated><author><name>David Bernal</name><uri>https://sourceforge.net/u/dbernalm/</uri></author><id>https://sourceforge.net7a6f3f8a71f498170051755e0a5175f1089d0162</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;First of all, thanks for creating this useful project.&lt;/p&gt;
&lt;p&gt;The problem is that when the HookKeyboard() pyhook function is used and the ´ character (located at the right of the p in spanish keyboard layouts) is typed, two characters are displayed (´´), making it impossible to write accented vocals such as á. The normal behavior is that when pressing that specific accent it should wait for the next character to be pressed and decide if either write an accented vowel for example á, or type the ' followed by the next character in case it is not a vowel, such as ´= or ´p. These accented vowels are covered by extended Ascii, as I´ve verified the ascii value is below 255.&lt;/p&gt;
&lt;p&gt;This function is being used to write a proof of concept keylogger that is being used only for research purposes. The accented vowels is being written normally on the log file, the problem only shows up on what the user notices that is being written. When i stopped the pyhook program, the problem is fixed and the accented vowels show up as expected. Is it possible to fix it? Thanks.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;This&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;code&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="err"&gt;´&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="n"&gt;using&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;win32api&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;win32console&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;win32gui&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;pythoncom&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nn"&gt;pyHook&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;sys&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;OnKeyboardEvent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
  &lt;span class="c"&gt;#Handling function...&lt;/span&gt;

&lt;span class="n"&gt;hm&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;pyHook&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;HookManager&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;hm&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;KeyDown&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;OnKeyboardEvent&lt;/span&gt;

&lt;span class="n"&gt;hm&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;HookKeyboard&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="n"&gt;pythoncom&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;PumpMessages&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry><entry><title>#1 TypeError in Switch function</title><link href="https://sourceforge.net/p/pyhook/bugs/1/?limit=25#76ca" rel="alternate"/><published>2015-10-21T14:15:32.359000Z</published><updated>2015-10-21T14:15:32.359000Z</updated><author><name>Stefano Borzoni</name><uri>https://sourceforge.net/u/isama92/</uri></author><id>https://sourceforge.net473e4c77959e212e020b9163f7431add53d239d7</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://sourceforge.net/p/pyhook/bugs/1/#5a83"&gt;https://sourceforge.net/p/pyhook/bugs/1/#5a83&lt;/a&gt;&lt;br/&gt;
This fixed the bug for me, thanks :P&lt;/p&gt;
&lt;/blockquote&gt;&lt;/div&gt;</summary></entry><entry><title>#2 Problem with accents (french locale)</title><link href="https://sourceforge.net/p/pyhook/bugs/2/?limit=50#7684" rel="alternate"/><published>2014-10-27T23:07:07.760000Z</published><updated>2014-10-27T23:07:07.760000Z</updated><author><name>Milan Herbig</name><uri>https://sourceforge.net/u/m1lhaus/</uri></author><id>https://sourceforge.net0c2bbc2f54e362a40cbeb75a87668cefb43a370b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi, I found this bug today. I also have non-english keyboard, czech keyboard concretely. I am unable to write chars like é, ě, ü, etc. All I get is doubled accents and diacritics. So I spent rest of the day to find out why and I may have a solution. &lt;/p&gt;
&lt;p&gt;First I found this thread:&lt;br /&gt;
&lt;a href="http://www.experts-exchange.com/Programming/Microsoft_Development/Q_23453780.html" rel="nofollow"&gt;http://www.experts-exchange.com/Programming/Microsoft_Development/Q_23453780.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;With proposed enhancement I was able to write non-Shift chars like é, ö, but not chars ě (needs hold shift key). &lt;/p&gt;
&lt;p&gt;Finally I found this post:&lt;br /&gt;
&lt;a href="http://stackoverflow.com/questions/1964614/toascii-tounicode-in-a-keyboard-hook-destroys-dead-keys" rel="nofollow"&gt;http://stackoverflow.com/questions/1964614/toascii-tounicode-in-a-keyboard-hook-destroys-dead-keys&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I've tried to implement ToUnicode (somehow) and it works. But I am not C++ programmer at all, lowlevel win32 programming is nightmare for me, but I hope it will work. &lt;/p&gt;
&lt;p&gt;Here is attached .zip file with modified cpyHook.i file. Please, feel free to try this and let us know, if it works on yout keyboard too. Thanks&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>