From 74e252b176abea3ed5c4184174670f41b0bed1c1 Mon Sep 17 00:00:00 2001 From: Josh Bendavid Date: Thu, 17 Oct 2019 01:49:19 +0200 Subject: [PATCH 1/3] Update with added options for multiple event types and emulated key hold events. --- source/_integrations/keyboard_remote.markdown | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/source/_integrations/keyboard_remote.markdown b/source/_integrations/keyboard_remote.markdown index 5ff4877008a9..ff29d05402b6 100644 --- a/source/_integrations/keyboard_remote.markdown +++ b/source/_integrations/keyboard_remote.markdown @@ -22,10 +22,22 @@ keyboard_remote: {% configuration %} type: - description: Possible values are `key_up`, `key_down`, and `key_hold`. Be careful, `key_hold` will fire a lot of events. + description: Possible values are `key_up`, `key_down`, and `key_hold`. Be careful, `key_hold` will fire a lot of events. This can be a list of types. required: true type: string -device_description: +emulate_key_hold: + description: Emulate key hold events when key is held down. (Some input devices do not send these otherwise.) + required: false + type: boolean +emulate_key_hold_delay: + description: Number of milliseconds to wait before sending first emulated key hold event + required: false + type: positive_int +emulate_key_hold_repeat: + description: Number of milliseconds to wait before sending subsequent emulated key hold event + required: false + type: positive_int +device_descriptor: description: Path to the local event input device file that corresponds to the keyboard. required: false type: string @@ -45,9 +57,14 @@ A full configuration for two Keyboard Remotes could look like the one below: ```yaml keyboard_remote: - device_descriptor: '/dev/input/by-id/bluetooth-keyboard' - type: 'key_up' + type: 'key_down' + emulate_key_hold: true + emulate_key_hold_delay: 250 + emulate_key_hold_repeat: 33 - device_descriptor: '/dev/input/event0' - type: 'key_up' + type: + - 'key_up' + - 'key_down' ``` Or like the following for one keyboard: From 1fddee738c7c9e03b1efaf1da9ce09f34cb2cfeb Mon Sep 17 00:00:00 2001 From: Josh Bendavid Date: Thu, 17 Oct 2019 01:58:38 +0200 Subject: [PATCH 2/3] Update keyboard_remote.markdown --- source/_integrations/keyboard_remote.markdown | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/_integrations/keyboard_remote.markdown b/source/_integrations/keyboard_remote.markdown index ff29d05402b6..ee99272eb785 100644 --- a/source/_integrations/keyboard_remote.markdown +++ b/source/_integrations/keyboard_remote.markdown @@ -28,15 +28,18 @@ type: emulate_key_hold: description: Emulate key hold events when key is held down. (Some input devices do not send these otherwise.) required: false - type: boolean + type: boolean + default: false emulate_key_hold_delay: description: Number of milliseconds to wait before sending first emulated key hold event required: false type: positive_int + default: 350 emulate_key_hold_repeat: description: Number of milliseconds to wait before sending subsequent emulated key hold event required: false type: positive_int + default: 33 device_descriptor: description: Path to the local event input device file that corresponds to the keyboard. required: false From 591bc5f765993610e5b46130377126ace9121a1f Mon Sep 17 00:00:00 2001 From: Josh Bendavid Date: Sat, 19 Oct 2019 01:54:15 +0200 Subject: [PATCH 3/3] Change delay and repeat settings to float --- source/_integrations/keyboard_remote.markdown | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/_integrations/keyboard_remote.markdown b/source/_integrations/keyboard_remote.markdown index ee99272eb785..39a040962ca6 100644 --- a/source/_integrations/keyboard_remote.markdown +++ b/source/_integrations/keyboard_remote.markdown @@ -33,13 +33,13 @@ emulate_key_hold: emulate_key_hold_delay: description: Number of milliseconds to wait before sending first emulated key hold event required: false - type: positive_int - default: 350 + type: float + default: 0.250 emulate_key_hold_repeat: description: Number of milliseconds to wait before sending subsequent emulated key hold event required: false - type: positive_int - default: 33 + type: float + default: 0.033 device_descriptor: description: Path to the local event input device file that corresponds to the keyboard. required: false