We mostly expected people to attach a bluetooth keyboard to their tablet or phone. For people who insisted on using a touch screen, we were working on a graphical context sensitive system like you describe -- except for existing languages (Objective-C)... because nobody wants to keep tapping semicolons and parenthesis :-)