KeyZag, an intelligent zigzag layout keyboard for smartphones