ethanhs / pyhooked

Pure Python hotkey hook, with thanks to pyHook and pyhk
155 stars 28 forks source link

PrtSc key recognition #2

Closed bakatrouble closed 9 years ago

bakatrouble commented 9 years ago

First digit in keycode was stripped (length of "key_code=" is 9, not 10), so fixed (lines 34, 50) Maybe some additional edits required

ethanhs commented 9 years ago

I'll go over this. Thanks for catching that!

ethanhs commented 9 years ago

@bakatrouble Looks good, thank you for contributing. I am wondering what your opinion is on key=self.keylist[95]. Wouldn't it be faster just to say key="PrtSc"?

bakatrouble commented 9 years ago

Just did it the same way it was made for other keys, for code style consistency

Just curious, what are those empty key names for?

ethanhs commented 9 years ago

Makes sense.

The empty keys are for non-standard keyboards (I think). There are many layouts, and not all numbers are applicable. The original "Null" is not used b/c numbering starts at 1 not 0.