Two things:
1: OP asked for a solution and Zyriab provided. You simply provided criticism for the solution without providing your own solution. Your input that you would buy a usb device does not fit with what op wanted. There is a reason to use a virtual keypad rather than external: being that reaching for an external would be anti-productive by moving from the home row.
2: My needs are exactly that of what Zyriab suggested. To me your comments are discouraging of solutions based on assumption of user level. This is a problem for me because it in fact isn't an advanced programming technique, perspectively. Don't knock solutions that are too high level for you unless you asked the question.