Here's a virutal midi keyboard for pd. It works only if the virtual keyboard window has the focus. See the help patch for details.
It is designed for french layout because it is the only keyboard I have. Adapting it to other layouts should be easy (it is just a matter of a few key numbers routing) and some help to create some pdkb-qw version would be very much appreciated.