Button reassignment

Archie
Site Admin
Posts: 144
Joined: 31 Jan 2019 15:27

Button reassignment

Post by Archie » 10 Jul 2019 12:03

Often, placement of buttons and default actions assigned to them are not optimal. Most proprietary drivers from trackball vendors are capable to rearrange action/button bindings according to user taste - but it's not always possible for number of reasons. Support for particular device might be removed from current version of driver, and older driver can not be used with modern OS version, etc.

For such cases, separate third-party universal solution's could be used. IMHO, for Windows the best of them is excellent X-Mouse Button Control utility by Phillip Gibbons:
https://www.highrez.co.uk/downloads/XMo ... ontrol.htm
X-Mouse Button Control (XMBC) allows you to create application and window specific profiles. This in turn, allows you to re-configure your mouse behaviour for individual applications or windows. For each profile you can also configure up to 10 'layers' of different button configurations which you can switch between using hot-keys or mouse buttons.
NB: note that generic Windows driver is capable to handle up to five mouse buttons (plus scrolling signals), so if particular device is equipped with more buttons or other controls, they can not be used without proprietary driver supporting them.

For Apple systems, there's USB Overdrive by Alessandro Levi Montalcini:
http://www.usboverdrive.com/USBOverdrive/News.html
The USB Overdrive is a device driver for macOS that handles any USB or Bluetooth mouse, keyboard, trackball, joystick, gamepad or gaming device from any manufacturer and lets you configure it either globally or on a per-application, per-device basis.

lawikekurd
Posts: 4
Joined: 16 Mar 2023 15:21

Re: Button reassignment

Post by lawikekurd » 16 Mar 2023 16:25

Hi,

Can we assign macros such as a string of text to be pasted in with the click of a button on a trackball?

Archie
Site Admin
Posts: 144
Joined: 31 Jan 2019 15:27

Re: Button reassignment

Post by Archie » 16 Mar 2023 17:39

Yes, of course. For example, in XMBC it's called "Simulated Keystrokes": you can enter virtually anything, add modifiers, delays, etc.
Spoiler
Show
Type the key sequence into the box above.
You can simulate the following extended keys using the specified tags...

Modifier tags:
{CTRL} {RCTRL} {ALT} {RALT} {SHIFT} {RSHIFT} {LWIN} {RWIN} {APPS}
NOTE: modifier tags can be combined like {CTRL}{ALT} but apply to the NEXT KEY ONLY.
For example, to send CTRL+a+CTRL+s you should type '{CTRL}A{CTRL}S'.

Extended key tags:
{DEL} {INS} {PGUP} {PGDN} {HOME} {END} {RETURN} {ESCAPE} {BACKSPACE}
{TAB} {PRTSCN} {PAUSE} {SPACE} {CAPSLOCK} {NUMLOCK} {SCROLLLOCK} {BREAK} {CTRLBREAK}

Direction key tags: {UP} {DOWN} {LEFT} {RIGHT}
Function key tags: {F1, F2, F3 ... F24}
Volume key tags: {VOL+}, {VOL-}, {MUTE}
Media key tags: {MEDIAPLAY}, {MEDIASTOP}, {MEDIANEXT}, {MEDIAPREV}
Mouse button tags: {LMB}, {RMB}, {MMB}, {MB4/XMB1}, {MB5/XMB2}
Mouse button up/down tags: Add a D (for down/pressed)
or a U (for up/released) to the mouse button tags (above)
e.g. {LMBD}, {LMBU}, {RMBD}, {RMBU}, {MB4D}, {MB5U} etc.
Mouse wheel tags: {MWUP}, {MWDN}, {TILTL}, {TILTR}
Numeric keypad tags: {NUM0-NUM9} {NUM+} {NUM-} {NUM.} {NUM/} {NUM*} {NUMENTER}
Web/Browser keys: {BACK}, {FORWARD}, {STOP}, {REFRESH}, {WEBHOME}, {SEARCH}, {FAVORITES}
Toggle keys: {NUMLOCKON}, {NUMLOCKOFF}, {CAPSLOCKON}, {CAPSLOCKOFF},
{SCROLLLOCKON}, {SCROLLLOCKOFF}

Special function tags: {WAIT:n} inserts a delay of <n> seconds.
{WAITMS:n} inserts a delay of <n> milliseconds.
{HOLD:n} holds the next key down for <n> seconds.
{HOLDMS:n} holds the next key down for <n> milliseconds.
{VKC:n} Sends the specified virtual key code.
{EXT:n} Sends the specified extended virtual key code.
{CLEAR} Clears any modifier tags {CTRL},{ALT} etc.
{SC:n} Sends the specified keyboard scan code.
{SCE:n} Sends the specified extended keyboard scan code.
{CB:<text>} Copies the specified <text> to the clipboard.

Movement tags: {MADD:x,y} Move cursor X & Y position by <x,y> pixels
{MSET:x,y} Set cursor position to <x,y> (relative to primary monitor)
{PSET:x,y} Set cursor position to <x,y> (relative to profile window)
{ASET:x,y} Set cursor position to <x,y> (relative to active window)
{MSAVE:n} Save the current cursor position to memory <n> (1-10)
{MREST:n} Restore the saved cursor position from memory <n> (1-10)

Application tags: {RUN:<application>} {RUN:<full path to exe>}
Run the specified application. If the application is not in the system PATH
please specify the full path to the executable (including .EXE)

Action tags: {ACTIVATE} Activate the window under the cursor.
{ACTIVATEPARENT} Activate the parent of the window under the cursor.
{ACTIVATETOP} Activate the top level (root) owner of the window under the cursor.
{CURSORBUSY} Switch the mouse pointer to the busy cursor.
{CURSORDEFAULT} Switch the mouse pointer to the default cursor.
{INVERTXY} Invert X and Y Axis.
{INVERTX} Invert X Axis.
{INVERTY} Invert Y Axis.
{LOCKX} Lock X Axis.
{LOCKY} Lock Y Axis.

Windows Message tags: {POSTWM:<M>,<L>,<W>} Post a message to the window under the cursor.
{SENDWM:<M>,<L>,<W>} Send a message to the window under the cursor.
WHERE: <M> is the message, <L> is the LPARAM value and <W> is the WPARAM value.
NOTE: <M>, <L> & <W> can be specified in decimal (eg. 16) or hex (eg. 0x10).

Layer modifier tags: {LAYER:x} Switch to layer <x>
{LAYER:next} Switch to next layer
{LAYER:back} Switch to preceding layer
{LAYER:last} Switch to the last active layer

Special tags for send methods 1,2,4,5,6,7 & 9:
{PRESS} Press down the following key
{RELEASE} Release (let go of) the following key
NOTE: You must {RELEASE} any key you {PRESS} in the same sequence!

On Button Pressed/Released/Repeated tags:
{OD} Only send when the button is pressed
{OU} Only send when the button is released
{OR} Only send when repeating

For example:
To close a window: {ALT}{F4}
To select all items: {CTRL}A
To type bold 'my text' in Microsoft Word: {CTRL}bmy text{CTRL}b
To send an 'r' key with a 50ms delay between the down and up, {HOLDMS:50}r
To turn OFF numlock, {NUMLOCKOFF}
To press a b and c, wait 100ms and release them: {PRESS}abc{WAITMS100}{RELEASE}cba