AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Remap keyboard keys to mouse4/5/2023 KeyWait AppsKey Prevents keyboard auto-repeat from repeating the mouse click. KeyWait RCtrl Prevents keyboard auto-repeat from repeating the mouse click. * Left-click (hold down Control/Shift to Control-Click or Shift-Click). *#Right::MouseMove, 10, 0, 0, R Win+RightArrow => Move cursor to the right *#Left::MouseMove, -10, 0, 0, R Win+LeftArrow => Move cursor to the left *#Down::MouseMove, 0, 10, 0, R Win+DownArrow => Move cursor downward By contrast, the following example is a simpler demonstration: *#up::MouseMove, 0, -10, 0, R Win+UpArrow hotkey => Move cursor upward Since that script offers smooth cursor movement, acceleration, and other features, it is the recommended approach if you plan to do a lot of mousing with the keyboard. The keyboard can be used to move the mouse cursor as demonstrated by the fully-featured Keyboard-To-Mouse script. A percent sign (%) as a destination key.This is because each remapping internally uses as destination keys. For example, A::b is typically equivalent to A::B and ^a::b is equivalent to ^a::^b. However, a remapping opposite to the one above would not work as one might expect, as a remapping never "releases" the modifier keys which are used to trigger it. ![]() For example, the following line would produce an uppercase B when you type either "a" or "A" (as long as CapsLock is off): a::B Ive been using my MacBook Pro connected with an external monitor, keyboard and mouse for 3 months and I love this setup. By contrast, specifying an uppercase letter on the right side forces uppercase. The examples above use lowercase, which is recommended for most purposes because it also remaps the corresponding uppercase letters (that is, it will send uppercase when CapsLock is "on" or the Shift key is held down). The B key would continue to send the "b" keystroke unless you remap it to something else as shown in the following example: a::b The above example does not alter the B key itself. For example, a script consisting only of the following line would make the A key behave like the B key: a::b The syntax for the built-in remapping feature is OriginKey::DestinationKey. For the advantages and disadvantages of each approach, see registry remapping. Limitation: AutoHotkey's remapping feature described below is generally not as pure and effective as remapping directly via the Windows registry. Remapping via the Registry's "Scancode Map".Moving the Mouse Cursor via the Keyboard.It's a little more complex to set up but might work for this (admittedly I have not tested mouse wheel usage in a tty / single user mode - with or without map2 - but maybe it would work for scrolling terminal output?).Previous page next page Remapping Keys (Keyboard, Mouse and Joystick) Table of Contents If you need it in a tty / singleuser mode / other non-graphical session for some reason, check out map2 by shiro. It should work now as long as you are in a graphical session. if you prefer), but use whatever works for you. I use Super+ for mouse wheel up (or Super +, /. In the "keybindings" section (bottom half of window), double-click one of the "unassigned" fields and then press the key combo you want.You should now see 2 entries for custom shortcuts in the "Keyboard shortcuts" section (upper half of window): one for up and one for down.mouse wheel down) and enter the command: xdotool click 5. Click "Add custom shortcut" button again.mouse wheel up) and enter the command: xdotool click 4 then click the Add button. Click on Cinnamon DE's "Start" menu or whatever you call the main app menu and go to Preferences > Keyboard > Shortcuts tab > Custom section.First, you will need to install xdotool.This is the method I use and it works quite well. Option #2:Īnother fairly quick to set up method is to combine Cinnamon DE's global shortcuts with xdotool. You will likely have to build from source if you are on a non-Debian-based distro but other than that, it should be simple to use.ĭisclaimer: I don't actually use this myself as I prefer not to load another gui app for a simple keybinding. If you just want a simple GUI, you can try Input Remapper ( github). If someone wants to do this from a different DE that does not have some way of setting global hotkeys for the DE, then you might need to find another way to call/invoke the binding (perhaps the link I include at the end?). I'm on the Fedora 35 Cinnamon spin but will try to keep things generic so it is easy to adapt to Mint or other distros. There are several methods to accomplish this I'll outline a couple of the easier ones.
0 Comments
Read More
Leave a Reply. |