naggiman has asked for the wisdom of the Perl Monks concerning the following question:
I am using the X11::Protocol and Tk modules, and I want to convert any given character into its keysym name. How can I do this? There doesnt seem to be any obvious way, apart from having to generate my own hash table by hand (laborious, time consuming and error prone), i.e.
my %char_to_keysym = ( '&' => "ampersand", ' ' => "space", '=' => "equal", '+' => "plus", ..... );
Reason is I want to generate some XKeyPress/Release events for any given string, but cannot find how to do a lookup on non-alphanumeric keys...
Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Converting characters to keysyms
by zentara (Cardinal) on Feb 18, 2005 at 13:45 UTC | |
by naggiman (Novice) on Feb 18, 2005 at 16:17 UTC |