brownplt / pyret-lang

The Pyret language.
Other
1.07k stars 111 forks source link

add special key predicate #1638

Open shriram opened 2 years ago

shriram commented 2 years ago

It would be nice to have a is-special-key predicate exported by the world library to recognize all the special keys that on-key handlers can receive. That way, one can use a

 | is-special-key(k) then: …

without having to explicitly enumerate all of the possibilities (which may change over time). These are all the keys whose strings should never appear literally.