Keypad Functionality
Threading and keypad