Hot answers tagged

62

In more recent gnome versions (e.g., gnome-shell), you need to use this instead: gsettings set org.gnome.desktop.wm.preferences resize-with-right-button true Gnome defaults to using the Super ("Windows") key for window actions, so the above alone will enable moving (super-leftdrag) and resizing (super-rightdrag). To use the Alt key instead of the Super key ...


57

If you press Shift while doing things with the mouse, that overrides the mouse protocol and lets you select/paste. It's documented in the xterm manual for instance, and most terminal emulators copy that behavior. Notes for OS X: In iTerm, use Option instead of Shift.  In Terminal.app, use Fn.


51

Mouse scrolling and elevators will work if you enable them in your .screenrc. Screen FAQ Q: My xterm scrollbar does not work with screen. A: The problem is that xterm will not allow scrolling if the alternate text buffer is selected. The standard definitions of the termcap initialize capabilities ti and te switch to and from the alternate text ...


45

Keyboard methods If using the SDL frontend of QEMU: You can release focus using the Left Ctrl+ Left Alt. Notice you have to use the left keys! If using the GTK frontend of QEMU (default since QEMU 1.5): Press Ctrl+ Alt+ G Focus free method See my question I posted on this exact thing on ServerFault. The Q&A is titled: Any way to release focus on a ...


43

Start the program xev in a terminal. Move the mouse inside the xev window; you'll see a lot of stuff scroll by. Press each button in turn. Then switch back to the terminal window and press Ctrl+C. xev shows a description of each input event, in particular ButtonPress and ButtonRelease for mouse clicks (you'll also see a number of MotionNotify for mouse ...


36

On modern-ish X.org installations, there is an XF86Ungrab keysym, which causes the server to release all active pointer or keyboard grabs. You can make the server break all grabs by enabling break action XKB option, then generating the keysym either with a command or with the keyboard. With xdotool: setxkbmap -option grab:break_actions xdotool key ...


34

A pretty quick search would likely yield xev as a result. It will not show you everything that is pressed or typed in X ever. But rather, will allow you to see information about keycodes and mouse movements. However, with the -root option, you might be able to get xev to monitor the whole X session. Note, if you do this, you'll make it pretty difficult to ...


34

Put this block of code in your ~/.tmux.conf. This will enable mouse integration letting you copy from a pane with your mouse without having to zoom. set -g mouse on bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'" bind -n WheelDownPane select-pane ...


31

The feature you are talking about is called Auto-Scrolling. It lets you press & hold the middle mouse button and move your mouse to scroll smoothly. In Linux, the default behavior for this action (pressing middle mouse button) is generally used for pasting text. However, there is a preference setting in Firefox and an extension available for Chrome/...


29

I've found what cause this bad behavior with many linux flavors : /usr/share/vim/vim80/defaults.vim # may be "vim81" depending on your vim version it's 'sourced' if there's no ~/.vimrc but even if you have a /etc/vimrc or such /etc file, so if you don't have one just create a blank one as suggested by @lgpasquale: mkdir ~/.vim/; [[ -s ~/.vim/vimrc ]] &...


26

This Windows feature has never really made its way into the Unix world. In the Unix world, the primary purpose of the middle mouse button is to paste the clipboard content (or more precisely, text selected with the mouse, which is auto-copied). A couple of cross-platform applications such as Firefox and Chrome that support Linux-style middle mouse button ...


25

Just force the pointer to skip pixels, here's how: First list input devices: $ xinput list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ...


24

mouse support is disabled by default, so something is turning it on. Likely the reason your set mouse= is failing is because it's running before whatever is turning it on. I'd look through the rest of your vimrc, and possibly the system wide vimrc (/etc/vim/vimrc is a standard location). As a last resort, you can do this really ugly hack which will cause ...


24

Turns out this can be done via Firefox preferences. From the pull down menu: Edit --> Preferences Then select the tabs: Advanced --> general Then check "Use autoscrolling" Screenshot    


21

Try the following command : xdotool getmouselocation 2>&1 | sed -rn '${s/x:([0-9]+) y:([0-9]+) .*/\1 \2/p}' See http://www.semicomplete.com/projects/xdotool/


20

Recent versions of X (X.org server ≥1.11) support several debugging keysyms, introduced in this commit. When triggered, these perform actions related to grabs. By default (at least in recent versions), these are disabled (absent from the default keymap). However, if you have xdotool installed, it is possible to call them, by executing on the command-line: ...


20

This solution will work globally and preserve the middle mouse functionality. Install xbindkeys xsel xdotool Place this in ~/.xbindkeysrc "echo -n | xsel -n -i; pkill xbindkeys; xdotool click 2; xbindkeys" b:2 + Release Reload xbindkeys -p Run xbindkeys on startup, pkill xbindkeys to stop.


18

Hit F10 to open the menu and use the arrow keys to navigate to “Options” → “Customize Emacs” → “All Settings Matching…”. Type mouse and Enter. If your Emacs version doesn't have a menu when running in a terminal then run M-x customize. (This means: press Alt+X, type customize and press Enter.) Navigate to the search box, type mouse and press Enter. Mouse ...


17

You do it with X resources. I have a file, .Xresources, that contains these xterm-related resources: XTerm*VT100.cutNewLine: false XTerm*VT100.cutToBeginningOfLine: false XTerm*VT100.charClass: 33:48,35:48,37:48,42:48,45-47:48,64:48,95:48,126:48 In my .xinitrc file, I have some line that merge in those resources: if [ -f $userresources ]; then /usr/...


17

The following has been copied verbatim from an answer that @Luke posted on Ask Ubuntu. I am posting it as a community wiki answer so the information can be on this site as well. KDE has not built this into its control center yet, but you can use xinput from the command line. First, run xinput list to find the device number of your mouse: $ xinput list ⎡ ...


17

I had the same issue on Firefox 48, and this answer worked for me: Create ~/.config/gtk-3.0/settings.ini and add [Settings] gtk-primary-button-warps-slider = false I'm using XFCE, but Firefox is reading that setting for some reason. It also worked with other Gnome 3 applications, such as gnome-todo. After creating that file, I only had to restart ...


16

In Fedora 24 you can install gnome-tweak-tool using the following command: $ sudo dnf install gnome-tweak-tool Open gnome-tweak-tool and go to the "Keyboard and Mouse" tab and disable "Middle-click-Paste".


16

While I like Mikeserv's answer for cleverness, it has the downside that it will create a window which "steals" the focus and has to be clicked away. I also find it takes just slightly too long to start: about 0.2 to 0.3 seconds, which is just slightly too slow for a "smooth" experience. I finally got around to digging into XLib, and clobbered together a ...


16

I have a Dell Inspiron 15 7559. The left click stops working once in a while when I was using Ubuntu 16.04. After I installed Ubuntu 18.04, the left click stops working almost every time after I resume from suspend. The best solution I found is switching to another virtual console (TTY) by Alt + Ctrl + F1. The mouse works normally after switching back ...


14

Possibly something is constantly stealing the X selection. To find out who it is. You could compile this: #include <stdio.h> #include <X11/Xlib.h> #include <X11/Xatom.h> int main() { printf("%#lx\n", XGetSelectionOwner (XOpenDisplay(0), XA_PRIMARY)); return 0; } With: gcc that-file.c -lX11 That code is to return the window ID of ...


13

One more option is xinput. For instance, xinput test 8 would write motion a[0]=496 a[1]=830 motion a[0]=496 a[1]=829 motion a[0]=496 a[1]=832 motion a[0]=496 a[1]=834 upon mouse movement, where "8" is my mouse device number. Use xinput --list to find out the number of your mouse among devices.


12

Alternative solution After finishing writing the answer bellow, I realized that what you're trying to achieve could be accomplished much more elegantly with the help of xinput or even using Xorg's config. Make sure to read the documentation about controlling input devices in Xorg. Using udev (an answer to your question) According to my tests there are ...


12

This worked for me: gsettings set org.gnome.desktop.peripherals.mouse natural-scroll false gsettings set org.gnome.desktop.peripherals.touchpad natural-scroll false


11

Having the middle button paste is a unix user interface standard, like having the left button select or activate, and the right button do something else (such as extending, toggling, firing up a menu, …). You'll find it bound to pasting in most unix applications. If your problem is that your mouse is overly sensitive when you put your finger on the wheel, I ...


Only top voted, non community-wiki answers of a minimum length are eligible