avoid doubling glyphs after refresh
add focus and keyboard events