MapButton command: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Created page with "__TOC__ {| |width="50%"| '''Action:''' |width="50%"| <span class="f_Para">Lets you assign a command to a Client button without having to ed...")
 
No edit summary
Line 4: Line 4:
|width="50%"| '''Action:'''
|width="50%"| '''Action:'''
|width="50%"|
|width="50%"|
<span class="f_Para">Lets you [[reconfiguring_gui_buttons.html|assign a command to a Client button]] without having to edit a mapping file (</span><span class="f_Monospace">ui.xml</span><span class="f_Para"> or </span><span class="f_Monospace">uimore.xml</span><span class="f_Para">) and to restart the Client. </span>
<span class="f_Para">Lets you [[Reconfiguring GUI buttons and hot keys|assign a command to a Client button]] without having to edit a mapping file (</span><span class="f_Monospace">ui.xml</span><span class="f_Para"> or </span><span class="f_Monospace">uimore.xml</span><span class="f_Para">) and to restart the Client. </span>


'''Syntax:'''
'''Syntax:'''
Line 19: Line 19:


*''buttonName''  is one of:
*''buttonName''  is one of:
**''button0, button1, ... button14'', the names of the [[review_common_buttons.html|main button bar]] buttons  </span>
**''button0, button1, ... button14'', the names of the [[Button Bar|main button bar]] buttons  </span>
**''extraButton0, extraButton1, ... extraButton14'', the names of the [[review_common_buttons.html#launch_second_bar|extra button bar]] buttons  </span>
**''extraButton0, extraButton1, ... extraButton14'', the names of the [[Button Bar#Launching a second button bar|extra button bar]] buttons  </span>


*''command'' is either:
*''command'' is either:
**<span class="f_ListBul2">A [[client_command_ref.html|Client command]] </span>
**<span class="f_ListBul2">A [[Client Command Reference|Client command]] </span>
**<span class="f_ListBul1">The </span><span class="f_Monospace">separator</span><span class="f_ListBul1"> keyword </span><span class="f_ListBul2">(case not important), which converts the </span>''buttonName'' button to a visual [[intro_configurable_components.html#named_buttons|separator button]]  
**<span class="f_ListBul1">The </span><span class="f_Monospace">separator</span><span class="f_ListBul1"> keyword </span><span class="f_ListBul2">(case not important), which converts the </span>''buttonName'' button to a visual [[Introducing the configurable components#Named buttons and separators|separator button]]  


'''Examples:'''  
'''Examples:'''  

Revision as of 16:10, 6 December 2022

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