Entirely posible. I have mine set up using text so I can shuffle levels around without breaking the connection.
Possible errors are
Is there a keyboard object on your layout?
Is the event sheet connected to the layout?
I think the level 'numbers' are 0 index, so you may be using the wrong number.
Run the debug menu and check that the global variable is being set correctly. Set up another method of changing to the same level to test that is all working correctly.