Closed dbrgn closed 4 years ago
No there is currently no function to get a Key
from a &str
mainly it is not needed for the Servo browser. Servo only converts typed Key
s to strings but not the other way around.
As you say it would be easy to add by modifying convert.py
. Do you have a project that needs this function? I would be glad to add it.
Notes:
Code
Closed by #4
There's no function to get a
Key
from a&str
, right? Do you plan to add such a function?It could probably easily be generated by using
convert.py
and linear search, falling back toKey::Character
if none of the other keys matches.