Nov. 29th, 2015

oio11: (Default)
evdev
SYNOPSIS

Synopsis

This package provides bindings to the generic input event interface in Linux. The evdev interface serves the purpose of passing events generated in the kernel directly to userspace through character devices that are typically located in /dev/input/.
This package also comes with bindings to uinput, the userspace input subsystem. Uinput allows userspace programs to create and handle input devices that can inject events directly into the input subsystem.
In other words, python-evdev allows you to read and write input events on Linux. An event can be a key or button press, a mouse movement or a tap on a touchscreen.

Quick Start

Installing:
The following GNU/Linux distributions have python-evdev in their repositories:
 
The latest stable version of python-evdev can be installed from pypi, provided that you have gcc/clang, pip and the Python and Linux development headers installed on your system. Installing them is distribution specific and usually falls in one of these categories:
On a Debian compatible OS:
$ apt-get install python-dev python-pip gcc $ apt-get install linux-headers-$(uname -r) 
On a Redhat compatible OS:
$ yum install python-devel python-pip gcc $ yum install kernel-headers-$(uname -r) 
On Arch Linux and derivatives:
$ pacman -S core/linux-api-headers python-pip gcc 
Installing python-evdev with pip:
$ sudo pip install evdev 
Listing accessible event devices:
>>> from evdev import InputDevice, list_devices  >>> devices = [InputDevice(fn) for fn in list_devices()] >>> for dev in devices: ...    print(dev.fn, dev.name, dev.phys) /dev/input/event1    Dell Dell USB Keyboard   usb-0000:00:12.1-2/input0 /dev/input/event0    Dell USB Optical Mouse   usb-0000:00:12.0-2/input0 
Reading events from a device:
>>> from evdev import InputDevice, categorize, ecodes  >>> dev = InputDevice('/dev/input/event1') >>> print(dev) device /dev/input/event1, name "Dell Dell USB Keyboard", phys "usb-0000:00:12.1-2/input0"  >>> for event in dev.read_loop(): ...     if event.type == ecodes.EV_KEY: ...         print(categorize(event)) ... # pressing 'a' and holding 'space' key event at 1337016188.396030, 30 (KEY_A), down key event at 1337016188.492033, 30 (KEY_A), up key event at 1337016189.772129, 57 (KEY_SPACE), down key event at 1337016190.275396, 57 (KEY_SPACE), hold key event at 1337016190.284160, 57 (KEY_SPACE), up 
Accessing evdev constants:
>>> from evdev import ecodes  >>> ecodes.KEY_A, ecodes.ecodes['KEY_A'] ... (30, 30) >>> ecodes.KEY[30] ... 'KEY_A' >>> ecodes.bytype[ecodes.EV_KEY][30] ... 'KEY_A' >>> ecodes.KEY[152]  # a single value may correspond to multiple codes ... ['KEY_COFFEE', 'KEY_SCREENLOCK'] 
Further information:

News

  • Jun 16, 2015: Version 0.5.0 released.
  • Oct 07, 2014: Version 0.4.6 released.
  • Jul 06, 2014: Version 0.4.5 released.
  • Jun 04, 2014: Version 0.4.4 released.
  • Dec 19, 2013: Version 0.4.3 released.
  • Dec 13, 2013: Version 0.4.2 released.
  • Oct 17, 2013: Python-evdev is now available in Ubuntu Saucy.
  • Oct 11, 2013: Python-evdev is now available in Arch Linux.
  • Jul 24, 2013: Version 0.4.1 released.
  • Jul 01, 2013: Version 0.4.0 released.
  • May 29, 2013: Version 0.3.3 released.
  • Apr 05, 2013: Version 0.3.2 released.
  • Nov 23, 2012: Version 0.3.1 released.
  • Nov 06, 2012: Version 0.3.0 released.
  • Aug 22, 2012: Version 0.2.0 released.
  • May 18, 2012: Version 0.1.1 released.
  • May 17, 2012: Version 0.1.0 released.
See changelog for a full list of changes.

License

The evdev package is released under the terms of the Revised BSD License.
https://python-evdev.readthedocs.org/en/latest/
oio11: (Default)
Table of Contents
 

Name

evdev - Generic Linux input driver

Synopsis


Section "InputDevice"
  Identifier "devname"
  Driver "evdev"
  Option "Device"   "devpath"
  Option "Emulate3Buttons"     "True"
  Option "Emulate3Timeout"     "50"
  Option "GrabDevice"     "False"
  ...
EndSection

Description

evdev is an Xorg input driver for Linux's generic event devices. It therefore supports all input devices that the kernel knows about, including most mice and keyboards.
The evdev driver can serve as both a pointer and a keyboard input device, and may be used as both the core keyboard and the core pointer. Multiple input devices are supported by multiple instances of this driver, with one Load directive for evdev in the Module section of your xorg.conf for each input device that will use this driver.
 

Supported Hardware

In general, any input device that the kernel has a driver for can be accessed through the evdev driver. See the Linux kernel documentation for a complete list.
 

Configuration Details

Please refer to xorg.conf(5) for general configuration details and for options that can be used with all input drivers. This section only covers configuration details specific to this driver.
The following driver Options are supported:
Option "ButtonMapping" "string"
Sets the button mapping for this device. The mapping is a space-separated list of button mappings that correspond in order to the physical buttons on the device (i.e. the first number is the mapping for button 1, etc.). The default mapping is "1 2 3 ... 32". A mapping of 0 deactivates the button. Multiple buttons can have the same mapping. For example, a left-handed mouse with deactivated scroll-wheel would use a mapping of "3 2 1 0 0". Invalid mappings are ignored and the default mapping is used. Buttons not specified in the user's mapping use the default mapping.
Option "Device" "string"
Specifies the device through which the device can be accessed. This will generally be of the form "/dev/input/eventX", where X is some integer. The mapping from device node to hardware is system-dependent.
Option "DragLockButtons" "L1 B2 L3 B4"
Sets "drag lock buttons" that simulate holding a button down, so that low dexterity people do not have to hold a button down at the same time they move a mouse cursor. Button numbers occur in pairs, with the lock button number occurring first, followed by the button number that is the target of the lock button. Property: "Evdev Drag Lock Buttons".
Option "DragLockButtons" "M1"
Sets a "master drag lock button" that acts as a "Meta Key" indicating that the next button pressed is to be "drag locked". Property: "Evdev Drag Lock Buttons".
Option "Emulate3Buttons" "boolean"
Enable/disable the emulation of the third (middle) mouse button for mice which only have two physical buttons. The third button is emulated by pressing both buttons simultaneously. Default: on, until a middle mouse button event is registered. Property: "Evdev Middle Button Emulation".
Option "Emulate3Timeout" "integer"
Sets the timeout (in milliseconds) that the driver waits before deciding if two buttons where pressed "simultaneously" when 3 button emulation is enabled. Default: 50. Property: "Evdev Middle Button Timeout". Option "EmulateWheel" "boolean" Enable/disable "wheel" emulation. Wheel emulation means emulating button press/release events when the mouse is moved while a specific real button is pressed. Wheel button events (typically buttons 4 and 5) are usually used for scrolling. Wheel emulation is useful for getting wheel-like behaviour with trackballs. It can also be useful for mice with 4 or more buttons but no wheel. See the description of the EmulateWheelButtonEmulateWheelInertiaEmulateWheelTimeoutXAxisMapping, andYAxisMapping options. Default: off. Property "Evdev Wheel Emulation".
Option "EmulateWheelButton" "integer"
Specifies which button must be held down to enable wheel emulation mode. While this button is down, X and/or Y pointer movement will generate button press/release events as specified for the XAxisMapping and YAxisMapping settings. If the button is 0 and EmulateWheel is on, any motion of the device is converted into wheel events. Default: 4. Property: "Evdev Wheel Emulation Button".
Option "EmulateWheelInertia" "integer"
Specifies how far (in pixels) the pointer must move to generate button press/release events in wheel emulation mode. Default: 10. Property: "Evdev Wheel Emulation Inertia".
Option "EmulateWheelTimeout" "integer"
Specifies the time in milliseconds the EmulateWheelButton must be pressed before wheel emulation is started. If the EmulateWheelButton is released before this timeout, the original button press/release event is sent. Default: 200. Property: "Evdev Wheel Emulation Timeout".
Option "GrabDevice" "boolean"
Force a grab on the event device. Doing so will ensure that no other driver can initialise the same device and it will also stop the device from sending events to /dev/kbd or /dev/input/mice. Events from this device will not be sent to virtual devices (e.g. rfkill or the Macintosh mouse button emulation). Default: disabled.
Option "InvertX" "Bool"
Option "InvertY" "Bool"
Invert the given axis. Default: off. Property: "Evdev Axis Inversion".
Option "IgnoreRelativeAxes" "Bool"
Option "IgnoreAbsoluteAxes" "Bool"
Ignore the specified type of axis. Default: unset. The X server cannot deal with devices that have both relative and absolute axes. Evdev tries to guess wich axes to ignore given the device type and disables absolute axes for mice and relative axes for tablets, touchscreens and touchpad. These options allow to forcibly disable an axis type. Mouse wheel axes are exempt and will work even if relative axes are ignored. No property, this configuration must be set in the configuration. 
If either option is set to False, the driver will not ignore the specified axes regardless of the presence of other axes. This may trigger buggy behavior and events from this axis are always forwarded. Users are discouraged from setting this option.
Option "ReopenAttempts" "integer"
Number of reopen attempts after a read error occurs on the device (e.g. after waking up from suspend). In between each attempt is a 100ms wait. Default: 10.
Option "Calibration" "min-x max-x min-y max-y"
Calibrates the X and Y axes for devices that need to scale to a different coordinate system than reported to the X server. This feature is required for devices that need to scale to a different coordinate system than originally reported by the kernel (e.g. touchscreens). The scaling to the custom coordinate system is done in-driver and the X server is unaware of the transformation. Property: "Evdev Axis Calibration".
Option "SwapAxes" "Bool"
Swap x/y axes. Default: off. Property: "Evdev Axes Swap".
Option "XAxisMapping" "N1 N2"
Specifies which buttons are mapped to motion in the X direction in wheel emulation mode. Button number N1 is mapped to the negative X axis motion and button number N2 is mapped to the positive X axis motion. Default: no mapping. Property: "Evdev Wheel Emulation Axes".
Option "YAxisMapping" "N1 N2"
Specifies which buttons are mapped to motion in the Y direction in wheel emulation mode. Button number N1 is mapped to the negative Y axis motion and button number N2 is mapped to the positive Y axis motion. Default: "4 5". Property: "Evdev Wheel Emulation Axes".
 

Supported Properties

The following properties are provided by the evdev driver.
Evdev Axis Calibration
4 32-bit values, order min-x, max-x, min-y, max-y or 0 values to disable in-driver axis calibration.
Evdev Axis Inversion
2 boolean values (8 bit, 0 or 1), order X, Y. 1 inverts the axis.
Evdev Axes Swap
1 boolean value (8 bit, 0 or 1). 1 swaps x/y axes.
Evdev Drag Lock Buttons
8-bit. Either 1 value or pairs of values. Value range 0-32, 0 disables a value.
Evdev Middle Button Emulation
1 boolean value (8 bit, 0 or 1).
Evdev Middle Button Timeout
1 16-bit positive value.
Evdev Wheel Emulation
1 boolean value (8 bit, 0 or 1).
Evdev Wheel Emulation Axes
4 8-bit values, order X up, X down, Y up, Y down. 0 disables a value.
Evdev Wheel Emulation Button
1 8-bit value, allowed range 0-32, 0 disables the button.
Evdev Wheel Emulation Inertia
1 16-bit positive value.
Evdev Wheel Emulation Timeout
1 16-bit positive value.
 

Authors

Kristian Høgsberg.

See Also

Xorg(1) , xorg.conf(5) , Xserver(1) , X(7) , README.mouse.
 

 

http://www.x.org/archive/X11R7.5/doc/man/man4/evdev.4.html
oio11: (Default)
Debian Reference

Abstract

This Debian Reference is intended to provide a broad overview of the Debian system as a post-installation user's guide. It covers many aspects of system administration through shell-commandexamples. Basic tutorials, tips, and other information are provided for topics including fundamental concepts of the Debian system, system installation hints, Debian package management, the Linux kernel under Debian, system tuning, building a gateway, text editors, CVS, programming, and GnuPG for non-developers.


Copyright Notice

Copyright © 2001–2005 by Osamu Aoki <osamu#at#debian.org>.
Copyright (Chapter 2) © 1996–2001 by Software in the Public Interest.

This document may be used under the terms of the GNU General Public License version 2 or higher.

 

Permission is granted to make and distribute verbatim copies of this document provided the copyright notice and this permission notice are preserved on all copies.

 

Permission is granted to copy and distribute modified versions of this document under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

Permission is granted to copy and distribute translations of this document into another language, under the above conditions for modified versions, except that this permission notice may be included in translations approved by the Free Software Foundation instead of in the original English.

Read more... ) http://www.linuxtopia.org/online_books/linux_system_administration/debian_linux_guides/debian_linux_reference_guide/
oio11: (Default)

How to change the default font size of XTerm?


..  From messing with /etc/X11/app-defaults/XTerm file and man page for Xterm I found two methods.
Method 1 , simpler method but not permanent: hold Ctrl key and right click button. This should bring up a menu for VT fonts, which stays on only as long as you hold right click key. You should see 7 choices, the largest being huge, which is what i'm using because my vision isn't exactly good.

Source: xterm(1) man page, part VT Fonts, which states " The fontMenu pops up when when the “control” key and pointer button three are pressed in a window. "

Method 2, permanent: look through /etc/X11/app-defaults/XTerm, find what sizes lines such as *VT100.font1: , choose one, and write somewhere xterm*font: 10x20(10x20 , again this is my choice for reasons i already stated).

About my system: I'm running Ubuntu 13.10

shareimprove this answer

http://askubuntu.com/questions/161652/how-to-change-the-default-font-size-of-xterm

oio11: (Default)
Guayadeque alternatives for Linux
 
License:
All
 
 


http://alternativeto.net/software/guayadeque/?platform=linux

October 2025

S M T W T F S
   1234
567891011
12131415161718
19202122 232425
262728293031 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Mar. 27th, 2026 06:47 am
Powered by Dreamwidth Studios