I am trying to do a type of calculator that calculates the Body Mass Index of a person. It works real nice if I input the actual value (I use jQuery to make the calculus).
What I want to do though, is that instead of typing the value, the user to be able to write it from the numbers buttons, so it works like a calculator.
The problem I have is that I can't find how to know if an html input is selected. This is necessary since I will use the same "keyboard" for two different inputs (One to enter weight and another one for height). I put below an image of how it works. Same keyboard for two different inputs.