KEY­BOARD SHENANI­GANS

Maximum PC - - R&D -

In this project, we used the Key­board Python li­brary to em­u­late a real key­board us­ing just the push but­tons that con­trolled play­ing, paus­ing, and stop­ping video play­back. The Key­board li­brary can be used to press any keys, so we can au­to­mate mul­ti­ple key presses all from one push but­ton. The li­brary can also be used to write text to the screen.

How­ever, the most dan­ger­ous func­tion of this li­brary is that it can be used to record ev­ery sin­gle key press on the tar­get ma­chine. These key presses can be recorded to a list, then saved to a file, and used for ne­far­i­ous pur­poses. Of course, record­ing the key presses of a user, with­out their con­sent, is il­le­gal, and can land you in a lot of trou­ble—so don’t do it! With that said, it can be used as a pow­er­ful tool when de­bug­ging how a user in­ter­acts with your code, so for soft­ware test­ing (un­der con­sent with the gen­eral pub­lic and in-house testers), you can see which keys they were press­ing right be­fore the code locked up and/or went ther­monu­clear!

The Key­board li­brary works with Linux and Win­dows, and it’s cer­tainly lots of fun to play with. To read more about this li­brary, head over to the blog post at https://bigl.es/tues­day-tool­in­grecord-re­play-key­strokes-with­python, and see a few ex­am­ples of how it can be used in day-to-day life.

Newspapers in English

Newspapers from Australia

© PressReader. All rights reserved.