Skip to main content

awful.input somewm-only

Runtime input device configuration for SomeWM. This API is unique to SomeWM and not available in AwesomeWM.

Usage

local awful = require("awful")

-- Set properties
awful.input.tap_to_click = 1
awful.input.natural_scrolling = 1

-- Get properties
print(awful.input.pointer_speed)

Pointer Properties

PropertyTypeDefaultDescription
tap_to_clicknumber (0/1)0Enable tap-to-click on touchpads
natural_scrollingnumber (0/1)0Invert scroll direction (macOS-style)
pointer_speednumber0.0Pointer acceleration (-1.0 to 1.0)
scroll_buttonnumber0Button for scroll-on-button-down
left_handednumber (0/1)0Swap left/right mouse buttons
middle_emulationnumber (0/1)0Emulate middle button with left+right
scroll_methodnumber0Scroll method (see below)
accel_profilenumber0Acceleration profile (see below)
dragnumber (0/1)1Enable tap-and-drag
drag_locknumber (0/1)0Enable drag lock
dwtnumber (0/1)1Disable-while-typing

Scroll Methods

ValueMethod
0Default (device-dependent)
1Two-finger scrolling
2Edge scrolling
3Button scrolling

Acceleration Profiles

ValueProfile
0Adaptive (accelerates with speed)
1Flat (constant speed)

Keyboard Properties

PropertyTypeDefaultDescription
xkb_layoutstring"us"Keyboard layout (e.g., "us", "de", "us,ru")
xkb_variantstring""Layout variant (e.g., "dvorak", "colemak")
xkb_optionsstring""XKB options (e.g., "ctrl:nocaps")
xkb_modelstring""Keyboard model
repeat_ratenumber25Key repeat rate (keys per second)
repeat_delaynumber600Delay before repeat starts (milliseconds)

Common XKB Options

OptionEffect
ctrl:nocapsCaps Lock acts as Ctrl
ctrl:swapcapsSwap Caps Lock and Ctrl
compose:raltRight Alt is Compose key
grp:alt_shift_toggleAlt+Shift switches layouts
grp:win_space_toggleSuper+Space switches layouts

Example Configuration

-- In rc.lua
local awful = require("awful")

-- Touchpad settings
awful.input.tap_to_click = 1
awful.input.natural_scrolling = 1
awful.input.pointer_speed = 0.3
awful.input.dwt = 1 -- Disable touchpad while typing

-- Keyboard settings
awful.input.xkb_layout = "us"
awful.input.xkb_options = "ctrl:nocaps,compose:ralt"
awful.input.repeat_rate = 30
awful.input.repeat_delay = 300

See Also