From 0a7dd57ab32e5b2cfb14f038ed6f63effdfa119e Mon Sep 17 00:00:00 2001 From: Blake Drayson Date: Tue, 18 Jun 2024 09:00:09 +0100 Subject: [PATCH] Move USB fix from keymap.c to keymap level config.h --- .../elise_v2/keymaps/blake_iso/config.h | 24 +++++++++++++++++++ .../elise_v2/keymaps/blake_iso/keymap.c | 7 ------ .../elise_v2/keymaps/default/config.h | 24 +++++++++++++++++++ .../elise_v2/keymaps/default/keymap.c | 6 ----- .../elise_v2/keymaps/default_iso/config.h | 24 +++++++++++++++++++ .../elise_v2/keymaps/default_iso/keymap.c | 6 ----- 6 files changed, 72 insertions(+), 19 deletions(-) create mode 100644 keyboards/draytronics/elise_v2/keymaps/blake_iso/config.h create mode 100644 keyboards/draytronics/elise_v2/keymaps/default/config.h create mode 100644 keyboards/draytronics/elise_v2/keymaps/default_iso/config.h diff --git a/keyboards/draytronics/elise_v2/keymaps/blake_iso/config.h b/keyboards/draytronics/elise_v2/keymaps/blake_iso/config.h new file mode 100644 index 00000000000..a30e57780a2 --- /dev/null +++ b/keyboards/draytronics/elise_v2/keymaps/blake_iso/config.h @@ -0,0 +1,24 @@ +/*Copyright 2021 Blake Drayson / Draytronics + +Contact info@draytronics.co.uk + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +//KVM Specific tweaks to prevent key repeat on wake from sleep. +//Please comment out and recompile if you do not wish to use them. +#pragma once + +#define USB_POLLING_INTERVAL_MS 8 +#define USB_SUSPEND_WAKEUP_DELAY 3000 diff --git a/keyboards/draytronics/elise_v2/keymaps/blake_iso/keymap.c b/keyboards/draytronics/elise_v2/keymaps/blake_iso/keymap.c index e045cd01af4..c8a0ecd9598 100644 --- a/keyboards/draytronics/elise_v2/keymaps/blake_iso/keymap.c +++ b/keyboards/draytronics/elise_v2/keymaps/blake_iso/keymap.c @@ -18,13 +18,6 @@ along with this program. If not, see . #include QMK_KEYBOARD_H -//Fix to prevent key repeat on wake from sleep when using a KVM / non direct usb connection. -#undef USB_POLLING_INTERVAL_MS -#define USB_POLLING_INTERVAL_MS 8 -#undef USB_SUSPEND_WAKEUP_DELAY -#define USB_SUSPEND_WAKEUP_DELAY 3000 - - enum custom_layers { _BL, _FL, diff --git a/keyboards/draytronics/elise_v2/keymaps/default/config.h b/keyboards/draytronics/elise_v2/keymaps/default/config.h new file mode 100644 index 00000000000..a30e57780a2 --- /dev/null +++ b/keyboards/draytronics/elise_v2/keymaps/default/config.h @@ -0,0 +1,24 @@ +/*Copyright 2021 Blake Drayson / Draytronics + +Contact info@draytronics.co.uk + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +//KVM Specific tweaks to prevent key repeat on wake from sleep. +//Please comment out and recompile if you do not wish to use them. +#pragma once + +#define USB_POLLING_INTERVAL_MS 8 +#define USB_SUSPEND_WAKEUP_DELAY 3000 diff --git a/keyboards/draytronics/elise_v2/keymaps/default/keymap.c b/keyboards/draytronics/elise_v2/keymaps/default/keymap.c index 7d1f4bb1e50..1989f22f97c 100644 --- a/keyboards/draytronics/elise_v2/keymaps/default/keymap.c +++ b/keyboards/draytronics/elise_v2/keymaps/default/keymap.c @@ -17,12 +17,6 @@ along with this program. If not, see . */ #include QMK_KEYBOARD_H -//Fix to prevent key repeat on wake from sleep when using a KVM / non direct usb connection. -#undef USB_POLLING_INTERVAL_MS -#define USB_POLLING_INTERVAL_MS 8 -#undef USB_SUSPEND_WAKEUP_DELAY -#define USB_SUSPEND_WAKEUP_DELAY 3000 - enum custom_layers { _BL, _FL, diff --git a/keyboards/draytronics/elise_v2/keymaps/default_iso/config.h b/keyboards/draytronics/elise_v2/keymaps/default_iso/config.h new file mode 100644 index 00000000000..a30e57780a2 --- /dev/null +++ b/keyboards/draytronics/elise_v2/keymaps/default_iso/config.h @@ -0,0 +1,24 @@ +/*Copyright 2021 Blake Drayson / Draytronics + +Contact info@draytronics.co.uk + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +//KVM Specific tweaks to prevent key repeat on wake from sleep. +//Please comment out and recompile if you do not wish to use them. +#pragma once + +#define USB_POLLING_INTERVAL_MS 8 +#define USB_SUSPEND_WAKEUP_DELAY 3000 diff --git a/keyboards/draytronics/elise_v2/keymaps/default_iso/keymap.c b/keyboards/draytronics/elise_v2/keymaps/default_iso/keymap.c index 1aab7e16526..02f4b9c1cc8 100644 --- a/keyboards/draytronics/elise_v2/keymaps/default_iso/keymap.c +++ b/keyboards/draytronics/elise_v2/keymaps/default_iso/keymap.c @@ -18,12 +18,6 @@ along with this program. If not, see . #include QMK_KEYBOARD_H -//Fix to prevent key repeat on wake from sleep when using a KVM / non direct usb connection. -#undef USB_POLLING_INTERVAL_MS -#define USB_POLLING_INTERVAL_MS 8 -#undef USB_SUSPEND_WAKEUP_DELAY -#define USB_SUSPEND_WAKEUP_DELAY 3000 - enum custom_layers { _BL, _FL,