Hot answers tagged

117

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.


80

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 KVM ...


75

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 ...


65

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.


49

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)] ⎜ ↳ PixArt USB Optical Mouse id=10 [slave pointer (2)] ⎜ ↳ ETPS/2 Elantech Touchpad ...


44

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 ...


40

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 ...


33

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 ...


33

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    


32

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

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 ...


25

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 Firefox ...


22

This will work with all your applications without the need of installing anything. Get your input deviceID. In my case was 11. xinput list If you want, list available properties with xinput list-props <deviceID>. If you are using libinput (the future/present), almost all properties will start with libinput. For evdev check my answer here. With ...


21

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".


21

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 ⎡ ...


21

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 ...


19

Scrollwheel mice support a middle-button click event when pressing the scrollwheel. This is a great feature, but you may find it irritating. Fortunately it can be disabled. First, you need to know the id of the mouse, like this: $ xinput list | grep 'id=' which prints something like ⎡ Virtual core pointer id=2 [master pointer (3)...


17

Try Ctrl+Alt+F1 to text mode and immediately Ctrl+Alt+F7 to graphical mode.


17

You can hold the Shift key to use the normal mouse selection while xterm mouse-tracking is enabled. That works in all terminal emulators that I know (xterm, vte (like xfce-terminal) or rxvt-based ones). In vim specifically, mouse is normally not enabled by default in terminals. So there's probably a set mouse=a somewhere in you ~/.vimrc or your OS-supplied ...


17

You get the old page-up/down behavior via right-clicking on the scroll bar.


15

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 ...


15

add (xterm-mouse-mode 1) to your init.el file


14

xinput --query-state <mouse_id> This give you a state for all mouse buttons, that looks like this: 2 classes : ButtonClass button[1]=up button[2]=up button[3]=up button[4]=up button[5]=up button[6]=up button[7]=up button[8]=up button[9]=up button[10]=up button[11]=up button[12]=up button[13]=up ...


14

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


14

Try this: sudo modprobe -r psmouse sudo modprobe psmouse proto=imps


13

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 ...


13

It depends on the version of tmux. When tmux mouse is on then the mouse selections will not span panes and will be copied into tmux's selection buffer. When tmux mouse is off (as it is in the description) then the mouse selection will be native X (and span panes). I add the following to my ~/.tmux.conf. It will enable CTRL+b M (to turn tmux mouse on) and ...


12

Although it is an old question, the method I found best that works for me is using Ctrl + A + ESC key combination. This makes the screen output scrollable. From the documentation page: Virtual terminals in Screen can be manipulated by pressing the Ctrl+A key combination, and subsequently pressing a key to execute one of the commands given below: Esc ...


12

Well after going through a LOT of web pages, many giving some hints that did not seem to work, I found a hint (extra text around a paste) that lead me to the cause and the solution to the problem. It seems that vim has built into it a number of 'fake' termcap entries which it uses when it recognises specific terminals (and sometimes gets wrong, though it ...


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