Module: LinuxInput

Defined in:
lib/linux_input.rb,
lib/linux_input/input.rb,
lib/linux_input/version.rb

Defined Under Namespace

Classes: Timeval

Constant Summary collapse

INPUT_IOCTL_BASE =
?E.ord
EVIOCGVERSION =
Ioctl.IOR(INPUT_IOCTL_BASE, 0x01, :int)
EVIOCGID =
Ioctl.IOR(INPUT_IOCTL_BASE, 0x02, InputId.by_value)
EVIOCGREP =
Ioctl.IOR(INPUT_IOCTL_BASE, 0x03, :pointer)
EVIOCSREP =
Ioctl.IOW(INPUT_IOCTL_BASE, 0x03, :pointer)
EVIOCGKEYCODE =
Ioctl.IOR(INPUT_IOCTL_BASE, 0x04, :pointer)
EVIOCGKEYCODE_V2 =
Ioctl.IOR(INPUT_IOCTL_BASE, 0x04, InputKeymapEntry.by_value)
EVIOCSKEYCODE =
Ioctl.IOW(INPUT_IOCTL_BASE, 0x04, :pointer)
EVIOCSKEYCODE_V2 =
Ioctl.IOW(INPUT_IOCTL_BASE, 0x04, InputKeymapEntry.by_value)
EVIOCSFF =
Ioctl.IOC(Ioctl::IOC_WRITE, INPUT_IOCTL_BASE, 0x80, FfEffect.size)
EVIOCRMFF =
Ioctl.IOW(INPUT_IOCTL_BASE, 0x81, :int)
EVIOCGEFFECTS =
Ioctl.IOR(INPUT_IOCTL_BASE, 0x84, :int)
EVIOCGRAB =
Ioctl.IOW(INPUT_IOCTL_BASE, 0x90, :int)
EVIOCREVOKE =
Ioctl.IOW(INPUT_IOCTL_BASE, 0x91, :int)
EVIOCSCLOCKID =
Ioctl.IOW(INPUT_IOCTL_BASE, 0xa0, :int)
VERSION =
"1.1.1"

Class Method Summary collapse

Class Method Details

.EVIOCGABS(abs) ⇒ Object



33
# File 'lib/linux_input/input.rb', line 33

def EVIOCGABS(abs)     Ioctl.IOR(INPUT_IOCTL_BASE, 0x40 + abs, InputAbsinfo.by_value) end

.EVIOCGBIT(ev, len) ⇒ Object



32
# File 'lib/linux_input/input.rb', line 32

def EVIOCGBIT(ev, len) Ioctl.IOC(Ioctl::IOC_READ, INPUT_IOCTL_BASE, 0x20 + ev, len) end

.EVIOCGKEY(len) ⇒ Object



28
# File 'lib/linux_input/input.rb', line 28

def EVIOCGKEY(len)     Ioctl.IOC(Ioctl::IOC_READ, INPUT_IOCTL_BASE, 0x18, len) end

.EVIOCGLED(len) ⇒ Object



29
# File 'lib/linux_input/input.rb', line 29

def EVIOCGLED(len)     Ioctl.IOC(Ioctl::IOC_READ, INPUT_IOCTL_BASE, 0x19, len) end

.EVIOCGMTSLOTS(len) ⇒ Object



27
# File 'lib/linux_input/input.rb', line 27

def EVIOCGMTSLOTS(len) Ioctl.IOC(Ioctl::IOC_READ, INPUT_IOCTL_BASE, 0x0a, len) end

.EVIOCGNAME(len) ⇒ Object



23
# File 'lib/linux_input/input.rb', line 23

def EVIOCGNAME(len)    Ioctl.IOC(Ioctl::IOC_READ, INPUT_IOCTL_BASE, 0x06, len) end

.EVIOCGPHYS(len) ⇒ Object



24
# File 'lib/linux_input/input.rb', line 24

def EVIOCGPHYS(len)    Ioctl.IOC(Ioctl::IOC_READ, INPUT_IOCTL_BASE, 0x07, len) end

.EVIOCGPROP(len) ⇒ Object



26
# File 'lib/linux_input/input.rb', line 26

def EVIOCGPROP(len)    Ioctl.IOC(Ioctl::IOC_READ, INPUT_IOCTL_BASE, 0x09, len) end

.EVIOCGSND(len) ⇒ Object



30
# File 'lib/linux_input/input.rb', line 30

def EVIOCGSND(len)     Ioctl.IOC(Ioctl::IOC_READ, INPUT_IOCTL_BASE, 0x1a, len) end

.EVIOCGSW(len) ⇒ Object



31
# File 'lib/linux_input/input.rb', line 31

def EVIOCGSW(len)      Ioctl.IOC(Ioctl::IOC_READ, INPUT_IOCTL_BASE, 0x1b, len) end

.EVIOCGUNIQ(len) ⇒ Object



25
# File 'lib/linux_input/input.rb', line 25

def EVIOCGUNIQ(len)    Ioctl.IOC(Ioctl::IOC_READ, INPUT_IOCTL_BASE, 0x08, len) end

.EVIOCSABS(abs) ⇒ Object



34
# File 'lib/linux_input/input.rb', line 34

def EVIOCSABS(abs)     Ioctl.IOW(INPUT_IOCTL_BASE, 0xc0 + abs, InputAbsinfo.by_value) end