The keyboard object has a "Keyboard.LastKeyCode" expression which returns a number representing the last key pressed (which you can store in a variable), and a "On key code pressed" trigger which receives the key code as a parameter. You can create variables to store the KeyCodes currently assigned to each action in your custom controls, and then use the "On key code pressed" trigger to execute them.
I attached an example capx