Skill :: Cheking if the user has <Meta> or <Super> key in hi

S

Suresh Jeevanandam

Guest
Hi,
I want to write a generic code which would bind a skill function to the
key Super&lt;Key&gt;v or Meta&lt;Key&gt;v based on the keyboard the user has.

Is there a way to find this out? I could not find any function.

regards,
Suresh
 
Note that Sun Keyboards have "Meta" key whereas other keyboards have
"Super" (Windows) Key.

regards,
Suresh

Suresh Jeevanandam wrote:
Hi,
I want to write a generic code which would bind a skill function to
the key Super&lt;Key&gt;v or Meta&lt;Key&gt;v based on the keyboard the user has.

Is there a way to find this out? I could not find any function.

regards,
Suresh
 
In article &lt;dqo67e$8r$1@home.itg.ti.com&gt; Suresh Jeevanandam &lt;sureshj@DELETETHISti.com&gt; writes:
Hi,
I want to write a generic code which would bind a skill function to the
key Super&lt;Key&gt;v or Meta&lt;Key&gt;v based on the keyboard the user has.

Is there a way to find this out? I could not find any function.
You can use the command:

xmodmap -pm

in a terminal window to print the modifier keys currently mapped.

-Pete Zakel
(phz@seeheader.nospam)

To be is to do. -- Plato
To do is to be. -- Socrates
Do-be-do-be-do. -- Frank Sinatra
 
In article &lt;43d04a06$1@news.cadence.com&gt; pxhxz@cadence.com (Pete nospam Zakel) writes:
In article &lt;dqo67e$8r$1@home.itg.ti.com&gt; Suresh Jeevanandam &lt;sureshj@DELETETHISti.com&gt; writes:
Hi,
I want to write a generic code which would bind a skill function to the
key Super&lt;Key&gt;v or Meta&lt;Key&gt;v based on the keyboard the user has.

Is there a way to find this out? I could not find any function.

You can use the command:

xmodmap -pm

in a terminal window to print the modifier keys currently mapped.
I almost forgot -- there is a private hi function that returns the list of
modifiers available: hiiGetModifierList().

This function is unlikely to change (it was added for debug purposes), so I
don't see any harm in your using it. The return value is a list of lists,
the first list in the return list is the list of modifier strings available.
Following that is pretty much the same information given by "xmodmap -pm".

Note that starting in IC 6.1.0 we will be restricting the use of the Alt
modifier, though, so you shouldn't use that one for bindkeys. But there's
no problem using Super and/or Meta.

-Pete Zakel
(phz@seeheader.nospam)

Silverman's Law:
If Murphy's Law can go wrong, it will.
 

Welcome to EDABoard.com

Sponsor

Back
Top