Hot answers tagged

22

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


22

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


21

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


18

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 generating the keysym either with a command or with the keyboard. With xdotool: xdotool key XF86Ungrab On some systems, the XF86Ungrab keysym is bound to the key combination ...


18

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/


16

xdotool exposes the pointer location (xdotool getmouselocation), and recent versions (since 2.20110530.1) indicate which window is at that location as well. None of xwininfo, wmctrl or older versions of xdotool appear to have a way to match a window by a screen position where it's visible. The underlying X library call is XQueryPointer (corresponding to a ...


16

Assuming your GUI is X-based (as almost all UNIX GUIs are), use xinput. First, list your devices: $ xinput --list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ Windows mouse id=6 [slave pointer (2)] ⎣ Virtual ...


15

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


13

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


13

First thing that we need to accomplish is turning off mouse, but only in X. For this we could use xinput. We need to discover input devices that are connected to computer (to X server): pbm@tauri ~ $ xinput list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave ...


12

On most systems :set mouse=a will enable your mouse inside vim even on the console. I personally prefer using the vim keybindings, but some variant on: :vmap <C-c> "*y :imap <C-v> <ESC>"*gPa :nmap <C-v> "*gP Will probably do what you want for ctrl-c and ctrl-v


12

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


11

You can set this property with xinput. Run xinput list to see the list of connected input devices. Note the exact name or the number of the device corresponding to your mouse (not the “Virtual core pointer”, but something like “Logitech USB-PS/2 Mouse M-BA47”). The name depends on your mouse model; I think the number is assigned dynamically, so you might ...


10

The xwininfo command gives this kind of output, but you do have to click on the window you want info on: % xwininfo xwininfo: Please select the window about which you would like information by clicking the mouse in that window. xwininfo: Window id: 0xa0000d "flask" ... So doing: xwininfo | grep 'Window id:' might give you something ...


10

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    


10

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.


10

Keyboard method You can release focus using the Left Ctrl+ Left Alt. Notice you have to use the left keys! 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 guest in virt-manager without having to click Ctrl_L + Alt_L?. This will allow you to no longer have to use the ...


10

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


8

That you cannot install xdotool because you are not root doesn't mean you cannot run the program, for that you don't need any special privileges. Just download and compile from source. If you don't have access to a compiler then you can download the package for your system directly and extract the file from the package (for .deb first use ar, extracting ...


8

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


8

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


8

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


8

For linux (or at least the Debian family of distributions, e.g Ubuntu) there are the vim-gnome and vim-gtk packages. For Mac there is MacVim, for Windows gvim. Both are linked from the vim download page.


8

xinput --set-int-prop is deprecated. You should use --set-prop instead. Also, xinput --enable [device] and xinput --disable [device] can be used to enable and disable devices respectively. Here is a shell script I use to enable, disable, and toggle my laptop's touchpad: #!/bin/bash # Enables, disables, or toggles device device='AlpsPS/2 ALPS GlidePoint' ...


7

That's just the way that the PS/2 port works. Unlike the USB, the PS/2 was not designed to be hot-plugged. If you need the hot-plugging capability, use a USB mouse. Otherwise, there is no guarantee that any solution will work consistently.


7

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


6

I found this: https://aur.archlinux.org/packages/xf86-input-evdev-debounce/ after googling for "linux xinput mouse debounce" I'm not gonna test it. It's been a long time since you asked, but maybe someone has the same problem with a favorite mouse, so here it is. Also, I'm not an Arch user; but they really rock!


6

I answered this on Super User, and am quoting it here: [As Gilles noted,] In fact, it is possible to do this (at least with recent versions of X). You can do this by pressing the XF86Ungrab key, introduced in this commit. By default, this keysym is not bound to any physical key or key combination (it was disabled in 2012 after it was ...


6

On my ThinkPad X220T running GNOME 3 it's pretty easy to be typing along and accidentally bump the touchpad, causing some window other than the one you're typing into to be raised. Ostensibly, the solution to this problem is to click your name in the upper right, then click "System Settings", then "Mouse and Touchpad", and then "Disable touchpad while ...


6

If you are using KDE's own builtin screensaver, I'm not sure... however, if you are using xscreensaver or are interested in using xscreensaver the following should help. Using xscreensaver you can adjust the number of pixels that the mouse must move before deactivating the screensaver; not sure about completely disabling the mouse though. If you are not ...



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