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

Discussion in 'Cadence' started by Suresh Jeevanandam, Jan 19, 2006.

  1. Hi,
    I want to write a generic code which would bind a skill function to the
    key Super<Key>v or Meta<Key>v based on the keyboard the user has.

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

    regards,
    Suresh
     
    Suresh Jeevanandam, Jan 19, 2006
    #1
  2. Note that Sun Keyboards have "Meta" key whereas other keyboards have
    "Super" (Windows) Key.

    regards,
    Suresh
     
    Suresh Jeevanandam, Jan 19, 2006
    #2
  3. Suresh Jeevanandam

    Guest Guest

    You can use the command:

    xmodmap -pm

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

    -Pete Zakel
    ()

    To be is to do. -- Plato
    To do is to be. -- Socrates
    Do-be-do-be-do. -- Frank Sinatra
     
    Guest, Jan 20, 2006
    #3
  4. Suresh Jeevanandam

    Guest Guest

    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
    ()

    Silverman's Law:
    If Murphy's Law can go wrong, it will.
     
    Guest, Jan 20, 2006
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.