<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Global keypress handler]]></title><description><![CDATA[<p dir="auto">Hey,</p>
<p dir="auto">I've been looking for a while but i cant seem to find a global keypress handler in qt5, is there anyone that has already done this? I struggled with this for about 5 hours already and I can't seem to figure it out, thanks in advance.</p>
]]></description><link>https://forum.qt.io/topic/98972/global-keypress-handler</link><generator>RSS for Node</generator><lastBuildDate>Tue, 09 Jun 2026 21:26:01 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/98972.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 26 Jan 2019 13:11:06 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Global keypress handler on Sat, 26 Jan 2019 14:12:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mehodin">@<bdi>Mehodin</bdi></a><br />
The link i gave, but i found the test project from other post :)<br />
<a href="https://www.dropbox.com/s/yh7ynoy9k3kzu3l/globalkey.zip?dl=0" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.dropbox.com/s/yh7ynoy9k3kzu3l/globalkey.zip?dl=0</a></p>
<p dir="auto">it just show message box, but you can make it do what ever you want and<br />
app dont need to have focus.</p>
]]></description><link>https://forum.qt.io/post/507373</link><guid isPermaLink="true">https://forum.qt.io/post/507373</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Sat, 26 Jan 2019 14:12:59 GMT</pubDate></item><item><title><![CDATA[Reply to Global keypress handler on Sat, 26 Jan 2019 14:02:30 GMT]]></title><description><![CDATA[<p dir="auto">yeah, it's for windows only, which sample do you mean?</p>
]]></description><link>https://forum.qt.io/post/507371</link><guid isPermaLink="true">https://forum.qt.io/post/507371</guid><dc:creator><![CDATA[Mehodin]]></dc:creator><pubDate>Sat, 26 Jan 2019 14:02:30 GMT</pubDate></item><item><title><![CDATA[Reply to Global keypress handler on Sat, 26 Jan 2019 13:59:57 GMT]]></title><description><![CDATA[<p dir="auto">Hi<br />
The small sample i liked, worked fine, last time i tried it. ( for other forum poster)<br />
Its only for windows, but i assume thats fine ?</p>
]]></description><link>https://forum.qt.io/post/507370</link><guid isPermaLink="true">https://forum.qt.io/post/507370</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Sat, 26 Jan 2019 13:59:57 GMT</pubDate></item><item><title><![CDATA[Reply to Global keypress handler on Sat, 26 Jan 2019 13:58:08 GMT]]></title><description><![CDATA[<p dir="auto">something like that, i just couldnt figure out registerhotkey, if you could help me with that that would be great though.</p>
<p dir="auto">(Also could you like one of my posts? So i dont have to wait 10 minutes between every reply?)</p>
]]></description><link>https://forum.qt.io/post/507369</link><guid isPermaLink="true">https://forum.qt.io/post/507369</guid><dc:creator><![CDATA[Mehodin]]></dc:creator><pubDate>Sat, 26 Jan 2019 13:58:08 GMT</pubDate></item><item><title><![CDATA[Reply to Global keypress handler on Sat, 26 Jan 2019 13:56:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mehodin">@<bdi>Mehodin</bdi></a><br />
So its a global OS key handler you are after ?<br />
Like RegisterHotKey ?</p>
<p dir="auto"><a href="http://amin-ahmadi.com/2015/11/14/how-to-use-system-wide-hotkeys-in-your-qt-application/" target="_blank" rel="noopener noreferrer nofollow ugc">http://amin-ahmadi.com/2015/11/14/how-to-use-system-wide-hotkeys-in-your-qt-application/</a></p>
]]></description><link>https://forum.qt.io/post/507367</link><guid isPermaLink="true">https://forum.qt.io/post/507367</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Sat, 26 Jan 2019 13:56:28 GMT</pubDate></item><item><title><![CDATA[Reply to Global keypress handler on Sat, 26 Jan 2019 13:47:43 GMT]]></title><description><![CDATA[<p dir="auto">The UI will be spawned in another process, and show() / hide() will be called on the keypress depending on whether it's currently visible, i tried some stuff (GetKeyState, RegisterHotKey) but keystate is a blocking call and would prevent the UI from working properly, and i couldnt figure out registerhotkey.</p>
<p dir="auto">I also tired QShortCut already, it requires the UI to be in focus, ill take a look at notify but im affraid that it's also going to require focus.</p>
]]></description><link>https://forum.qt.io/post/507366</link><guid isPermaLink="true">https://forum.qt.io/post/507366</guid><dc:creator><![CDATA[Mehodin]]></dc:creator><pubDate>Sat, 26 Jan 2019 13:47:43 GMT</pubDate></item><item><title><![CDATA[Reply to Global keypress handler on Sat, 26 Jan 2019 13:16:30 GMT]]></title><description><![CDATA[<p dir="auto">Hi<br />
What about<br />
<a href="http://doc.qt.io/qt-5/qshortcut.html#details" target="_blank" rel="noopener noreferrer nofollow ugc">http://doc.qt.io/qt-5/qshortcut.html#details</a><br />
Alternatively there is<br />
<a href="http://doc.qt.io/qt-5/qcoreapplication.html#notify" target="_blank" rel="noopener noreferrer nofollow ugc">http://doc.qt.io/qt-5/qcoreapplication.html#notify</a></p>
<p dir="auto">But can I ask what is the use case ?</p>
]]></description><link>https://forum.qt.io/post/507356</link><guid isPermaLink="true">https://forum.qt.io/post/507356</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Sat, 26 Jan 2019 13:16:30 GMT</pubDate></item></channel></rss>