Added simple key handler in js