mangowmmangowm

Input Devices

Configure keyboard layouts, mouse sensitivity, and touchpad gestures.

Device Configuration

mangowm provides granular control over different input devices.

Keyboard Settings

Control key repeat rates and layout rules.

SettingTypeDefaultDescription
repeat_rateint25How many times a key repeats per second.
repeat_delayint600Delay (ms) before a held key starts repeating.
numlockon0 or 10Enable NumLock on startup.
xkb_rules_rulesstring-XKB rules file (e.g., evdev, base). Usually auto-detected.
xkb_rules_modelstring-Keyboard model (e.g., pc104, macbook).
xkb_rules_layoutstring-Keyboard layout code (e.g., us, de, us,de).
xkb_rules_variantstring-Layout variant (e.g., dvorak, colemak, intl).
xkb_rules_optionsstring-XKB options (e.g., caps:escape, ctrl:nocaps).

Example:

repeat_rate=40
repeat_delay=300
numlockon=1
xkb_rules_layout=us,de
xkb_rules_variant=dvorak
xkb_rules_options=caps:escape,ctrl:nocaps

Trackpad Settings

Specific settings for laptop touchpads. Some settings may require a relogin to take effect.

SettingDefaultDescription
disable_trackpad0Set to 1 to disable the trackpad entirely.
tap_to_click1Tap to trigger a left click.
tap_and_drag1Tap and hold to drag items.
trackpad_natural_scrolling0Invert scrolling direction (natural scrolling).
scroll_button274The mouse button that use for scrolling(272 to 279).
scroll_method11 (Two-finger), 2 (Edge), 4 (Button).
click_method11 (Button areas), 2 (Clickfinger).
drag_lock1Lock dragging after tapping.
disable_while_typing1Disable trackpad while typing.
left_handed0Swap left/right buttons.
middle_button_emulation0Emulate middle button.
swipe_min_threshold1Minimum swipe threshold.

Detailed descriptions:

  • scroll_button values:

    • 272 — Left button.
    • 273 — Right button.
    • 274 — Middle button.
    • 275 — Side button.
    • 276 — Extra button.
    • 277 — Forward button.
    • 278 — Back button.
    • 279 — Task button.
  • scroll_method values:

    • 0 — Never send scroll events (no scrolling).
    • 1 — Two-finger scrolling: send scroll events when two fingers are logically down on the device.
    • 2 — Edge scrolling: send scroll events when a finger moves along the bottom or right edge.
    • 4 — Button scrolling: send scroll events when a button is held and the device moves along a scroll axis.
  • click_method values:

    • 0 — No software click emulation.
    • 1 — Button areas: use software-defined areas on the touchpad to generate button events.
    • 2 — Clickfinger: the number of fingers determines which button is pressed.
  • accel_profile values:

    • 0 — No acceleration.
    • 1 — Flat: no dynamic acceleration. Pointer speed = original input speed × (1 + accel_speed).
    • 2 — Adaptive: slow movement results in less acceleration, fast movement results in more.
  • button_map values:

    • 0 — 1/2/3 finger tap maps to left / right / middle.
    • 1 — 1/2/3 finger tap maps to left / middle / right.
  • send_events_mode values:

    • 0 — Send events from this device normally.
    • 1 — Do not send events from this device.
    • 2 — Disable this device when an external pointer device is plugged in.

Mouse Settings

Configuration for external mice.

SettingDefaultDescription
mouse_natural_scrolling0Invert scrolling direction.
accel_profile20 (None), 1 (Flat), 2 (Adaptive).
accel_speed0.0Speed adjustment (-1.0 to 1.0).
left_handed0Swap left and right buttons.
middle_button_emulation0Emulate middle button.
swipe_min_threshold1Minimum swipe threshold.
send_events_mode00 (Enabled), 1 (Disabled), 2 (Disabled on external mouse).
button_map00 (Left/right/middle), 1 (Left/middle/right).


Keyboard Layout Switching

To bind multiple layouts and toggle between them, define the layouts in xkb_rules_layout and use xkb_rules_options to set a toggle key combination. Then bind switch_keyboard_layout to trigger a switch.

# Define two layouts: US QWERTY and US Dvorak
xkb_rules_layout=us,us
xkb_rules_variant=,dvorak
xkb_rules_options=grp:lalt_lshift_toggle

Or bind it manually to a key:

# Bind Alt+Shift_L to cycle keyboard layout
bind=alt,shift_l,switch_keyboard_layout

Use mmsg -g -k to query the current keyboard layout at any time.


Input Method Editor (IME)

To use Fcitx5 or IBus, set these environment variables in your config file.

Info: These settings require a restart of the window manager to take effect.

For Fcitx5:

env=GTK_IM_MODULE,fcitx
env=QT_IM_MODULE,fcitx
env=QT_IM_MODULES,wayland;fcitx
env=SDL_IM_MODULE,fcitx
env=XMODIFIERS,@im=fcitx
env=GLFW_IM_MODULE,ibus

For IBus:

env=GTK_IM_MODULE,ibus
env=QT_IM_MODULE,ibus
env=XMODIFIERS,@im=ibus

On this page