A virtual keyboard is an input device that emulates the functionality of a real computer keyboard.
 Touch Screen
A touch screen is a natural fit for a virtual keyboard. The keyboard software draws a keyboard on the screen that allows the user to tap key locations to enter characters. Often the keyboard is software configurable between QWERTY and pure alphabetical order. If the shift key is tapped the entire character set on the keyboard will typically switch cases to show the exact key code that will be generated with the next tap.
Typically a "shift" can be used for upper/lower case and another key can select numbers and punctuation. Another "shift" key could offer additional characters or even emoji characters. Some tablets and cell phones provide multiple base keyboards that may be chosen for different languages.
 Limited keypads
Devices with only a few keys may also be able to utilize a virtual keyboard which, in this case, displays some mapping information to translate the keypad data to alphanumeric information as input to the program. This might be for searching for words in a document or for dictionary lookup. The most common key pad used for this is the numeric keypad which maps the numbers 1-0 on the keypad to produce the full alphabet. The most straight forward use is with cell phones where it can be used to enter someones name into an address book. Typically a multi-tap method is used to accomplish this where a set of 3 or 4 letters plus a number is assigned to each key.
For example is the letters ABC were assigned to the number 1 then tapping 1 one time with a pause afterwards would cause an A to appear, tapping twice with not pause between the taps would generate a B and three taps would generate a C. While this works it is cumbersome to use and not always easy to enter the correct letter. Better techniques include the T9 approach as well as the T5.
 two digit keyboard
Another technique that only uses two taps for key entry maps the two entries mapping to a two digit number to map directly to a letter, number or symbol. Using this technique a full 100 (00-99) entries could be designed. The technique is available in Cool Reader for searching and dictionary support. When this method is selected a virtual keyboard appears on the screen to show how the two digits will be mapped. It looks like: