Skip to content

Commit 130a1b4

Browse files
committed
By default automatically disable NumberPad after 2 mins
1 parent de1def2 commit 130a1b4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ Attributes which do not depend on a specific Numpad keyboard can be changed acco
617617
```
618618
[main]
619619
numpad_disables_sys_numlock = 1
620-
disable_due_inactivity_time = 0
620+
disable_due_inactivity_time = 120
621621
touchpad_disables_numpad = 1
622622
key_repetitions = 0
623623
multitouch = 0
@@ -647,7 +647,7 @@ top_left_icon_slide_func_disabled = 0
647647
| --------------------------------------------- | -------- | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
648648
| **System** | | |
649649
| `enabled` | | `0` | NumberPad running status (enabled/disabled)
650-
| `disable_due_inactivity_time` | | `0` [s] | NumberPad is automatically disabled when no event received during this interval<br><br>decimal numbers allowed (e.g. `60.0` [s] is one minute, `0` set up by default disables this functionality)
650+
| `disable_due_inactivity_time` | | `120` [s] | NumberPad is automatically disabled when no event received during this interval<br><br>decimal numbers allowed (e.g. `60.0` [s] is one minute, `0` set up disables this functionality)
651651
| `touchpad_disables_numpad` | | `1` | when Touchpad is disabled is NumberPad is disabled aswell, valid value is `1` or `0` (e.g. via Fn+special key)<br><br>status is being attempted for the first time from `gsettings get org.gnome.desktop.peripherals.touchpad send-events` or using `qdbus` (more in code), can be tested via direct change `gsettings set org.gnome.desktop.peripherals.touchpad send-events 'enabled'` or simulation of Touchpad toggling via CLI `xdotool key XF86TouchpadToggle` or `xdotool key XF86TouchpadOn` and `xdotool key XF86TouchpadOff`, secondly the result of `xinput` is taken - in this case [this script](https://github.com/ldrahnik/elementary-os-scripts/blob/master/toggle_touchpad.sh) which has to be bound to a specific Touchpad key
652652
| `sys_numlock_enables_numpad` | | `1` | NumLock status obtained via active `LED_NUML` of keyboard device (by default NumberPad is enabled or disabled when the system NumLock is toggled)<br><br>System NumLock can be simulated `xdotool key Num_Lock`<br><br>`sys_numlock_enables_numpad` to be set to `1` automatically even when is in config file value is `0` (overwritten) in cases when no position key `EV_KEY.KEY_NUMLOCK` has been defined in the key layout and top right icon is not defined (size values `top_right_icon_width` and `top_right_icon_height`)
653653
| `numpad_disables_sys_numlock` | | `1` | when is set to `1` at each inactivation of NumberPad `EV_KEY.KEY_NUMLOCK` is sent. This is useful to not send NumLock when a laptop is connected to an external keyboard and one wants to disable NumberPad on laptop keeping NumLock on the external keyboard enabled

numberpad.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ def load_keymap_listener_x11():
591591
CONFIG_NUMPAD_DISABLES_SYS_NUMLOCK = "numpad_disables_sys_numlock"
592592
CONFIG_NUMPAD_DISABLES_SYS_NUMLOCK_DEFAULT = True
593593
CONFIG_DISABLE_DUE_INACTIVITY_TIME = "disable_due_inactivity_time"
594-
CONFIG_DISABLE_DUE_INACTIVITY_TIME_DEFAULT = 0
594+
CONFIG_DISABLE_DUE_INACTIVITY_TIME_DEFAULT = 120
595595
CONFIG_TOUCHPAD_DISABLES_NUMPAD = "touchpad_disables_numpad"
596596
CONFIG_TOUCHPAD_DISABLES_NUMPAD_DEFAULT = True
597597
CONFIG_KEY_REPETITIONS = "key_repetitions"

0 commit comments

Comments
 (0)