<div dir="ltr">Hi all,<div><br></div><div>Well, I've coded a small application called TheKaunter, </div><div><br></div><div><a href="https://github.com/jtornero/theKaunter/blob/master/source/theKaunter.py">https://github.com/jtornero/theKaunter/blob/master/source/theKaunter.py</a><br>
</div><div><br></div><div>Where I have a keyPressEvent function inside the main class cellCounter(QWidget) where keypressed are processed. I use keyPressEvent.modifiers() to make possible to use the same key for different purposes, say a key alone increases a counter while the same key pressed altogether with shitf/control makes another thing.</div>
<div><br></div><div>The problem comes with numerical keys, because with shift+key the correspondant symbol is generated (for instance, in a Spanish keyboard % symbol is generated with shift+5) and the program is not able to process it correctly because it receives the '%' key instead of 5 key plus modifier, as happens with letter keys where, despite the fact about modifier key pressed or not, you always receive a single key value (Capital letters in this case).</div>
<div><br></div><div>In keyPressEvent() I check the key against a list of configuraed keys to trigger one or another action. When you push a numerical key+shift, since you receive the symbol and the modifier (not the number plus the modifier, which is the defined key binding) the correspondant action can't be triggered.</div>
<div><br></div><div>Any suggestions to override this?</div><div><br></div><div>Thank you very much</div><div><br></div><div>Jtornero</div><div><br></div><div><br></div></div>