multitap_mode()    //called from main()
{
    WHILE FOREVER
    { 
        IF any_key_pressed        //key = '2' here
         THEN 
        {    print_base_char_for_key    //eg 'a' for 2
             
            FOR(i=0;i<1000,i++)    //scan 1000 times in 1 sec    
            {    IF same_key_pressed_again        //no support for pressing other keys yet
                THEN
                {   DECREMENT cursor_position
                    print_next_char_for_key    //should print 'b' now
                //will be 1 more loop here
                }    
                DELAY (1ms)    //wait for 1 second total in for loop
            }
        }
    }
}