MapButton command

From m204wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Action:

Lets you assign a command to a Client button without having to edit a mapping file (ui.xml or uimore.xml) and to restart the Client.

Syntax:

mapButton [buttonModifier-]buttonName command 

Where (case not important):

  • buttonModifier is one of:
    • alt, which maps the ALT-key version of the button (command runs when you click the button while holding down ALT)
    • cntrl, control, cntl, ctl, or ctrl, which maps the control-key version of the button (command runs when you click the button while holding down CTRL)

buttonModifier is optional, and its default is no modifier (command runs when you click the button).

  • buttonName  is one of:
    • button0, button1, ... button14, the names of the main button bar buttons  
    • extraButton0, extraButton1, ... extraButton14, the names of the extra button bar buttons  

Examples:

mapButton button0 viewtext 
mapButton ctl-button0 showAbout 
mapButton ALT-button0 showCommands 
mapButton eXTRAbutton0 openmacroConsole 

After you execute the command, the new mapping is reflected immediately in the button bar to which it applies. The new mapping does not appear in the mapping file. The new mapping does not survive a Client restart.

The command to remove a button mapping is clearButton. The command to map a keyboard shortcut is mapKey.

Client menu: --
Introduced: Build 56