keyboard update

gate was outputting crazy values. Major overhaul related to
simplification using touchscreen mode.