With the trackpoint module, the right-key on it can be configured to act as a mid-click when used alone, and as a
mod-layer trigger when held down, with the following macro specified using “extended macro commands”:
$ifNotPlaytime 150 tapKey mouseBtnMiddle
Motivation - for Windows users, it was difficult to get Thinkpad keyboards to function as they should as on Linux, where the middle-button sends a mid-click when tapped, and can trigger scrolling through the trackpoint when held down. There are many tools that may emulate this intended behavior, but they usually allow scrolling either horizontally or vertically. With UHK, the intended behavior gets restored with the following config:
Key mapping config
Note, the two lines of macro commands needs to be added as a “Command”, with Agent 3.2.1.
Agent and firmware versions
- Agent version: 3.2.1
- Right keyboard half firmware: UltimateHackingKeyboard/firmware: 10.4.0
- Left keyboard half firmware: UltimateHackingKeyboard/firmware: 10.4.0
- Trackpoint firmware: UltimateHackingKeyboard/firmware: 10.4.0
Many thanks to the merge of Karel’s branch to main
Great idea, I adapted it a bit to my liking. Short click on the button sends a right click mouse button, long hold on the button toggles the mod layer on/off. Here’s my macro:
ifLayer mod final unToggleLayer
final toggleLayer mod
If mapped this macro onto the trackpoint right button on both the base layer and on the mod layer. On the base layer, holding it will toggle to mod layer; on the mod layer, holding it will switch back to the base layer. Short tap will be just a regular right mouse button click, so you can still get to context menus etc.
With the mod layer toggled on, I can then use the trackpoint to scroll documents; and because it is a toggle (not just a hold), I don’t need to keep holding the button down.
@maexxx Thank you for sharing! For scrolling through long documents (usually webpages), I hold down the bottom left key to trigger the
mod layer, and use the Trackpoint to scroll.
Though, with the toggle, once you enter the
mod layer, how do you keep track of where you are?
It would be cool if the current mode of the keyboard can be projected somewhere to the PC on its main monitor? This way, with the long-hold toggling the
mod layer, there is a visual clue (like the little lights on UHK), to tell us where we are.
Also, it would be cool to have some timer for the toggle, such that the
mod layer will be deactivated after X seconds upon the release of the Trackpoint? With such a timer to deactivate
mod layer, one doesn’t have to always keep track of the current status of the keyboard
Per the last point, in spirit, this is to treat the base layer as the “Normal mode” in Vim.