Interesting! I can't test this, but you might want to try connecting up to wxKeyEvents - ie, use wxWidgets for your keyboard processing. See "Handling Keyboard Events" in the wxWidgets programming pdf "Cross-Platform GUI Programming
with wxWidgets".
with wxWidgets".