You need to use a function that returns VK_ values, such as GetKeyState. gets is not one of those functions so you cannot use it for what you want to do.