keyboard event hack to support WebKit buggy createEvent / initEvent objects