[API] Change activated envent to keydown, and add keyup event on Linux. Part of #200.