# How can I get 'KeyDown' without writing 26 commands?

EventHandler and {"KeyDown","x"} work for registering a specific letter. Is there a direct way to return whichever letter keys are pressed?

• See CurrentValue["EventKey"] – b3m2a1 Oct 6 '17 at 3:37

## 1 Answer

Perhaps something like this?:

DynamicModule[{key = ""},
EventHandler[
Dynamic[key],
{"KeyDown" :> (key = CurrentValue["EventKey"])}
]]