input hooking for Japanese ruby
https://github.com/phaier/phaier-ime/blob/master/src/ts/pime/views/auto-ruby.ts