linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] input: Add marine keycodes for radar control.
@ 2025-10-13 15:23 Hunter Moore
  2025-10-13 16:05 ` Dmitry Torokhov
  0 siblings, 1 reply; 3+ messages in thread
From: Hunter Moore @ 2025-10-13 15:23 UTC (permalink / raw)
  To: dmitry.torokhov; +Cc: linux-input, linux-kernel, Hunter Moore, Hunter Moore

From: Hunter Moore <hunter.moore@garmin.com>

We are looking into adding some additional keycodes to add support for
radar control. In total we are adding 29 keycodes which seems to
exceed the KEY_MAX limit set, so we have also bumped this value to
0x3ff to double the available keycodes.

Signed-off-by: Hunter Moore <Hunter.Moore@garmin.com>
---
 include/linux/mod_devicetable.h        |  2 +-
 include/uapi/linux/input-event-codes.h | 32 +++++++++++++++++++++++++-
 2 files changed, 32 insertions(+), 2 deletions(-)

diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index 6077972e8b45..97f8867955de 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -333,7 +333,7 @@ struct pcmcia_device_id {
 /* Input */
 #define INPUT_DEVICE_ID_EV_MAX         0x1f
 #define INPUT_DEVICE_ID_KEY_MIN_INTERESTING    0x71
-#define INPUT_DEVICE_ID_KEY_MAX                0x2ff
+#define INPUT_DEVICE_ID_KEY_MAX                0x3ff
 #define INPUT_DEVICE_ID_REL_MAX                0x0f
 #define INPUT_DEVICE_ID_ABS_MAX                0x3f
 #define INPUT_DEVICE_ID_MSC_MAX                0x07
diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
index ca5851e97fac..49a7fd7c0e23 100644
--- a/include/uapi/linux/input-event-codes.h
+++ b/include/uapi/linux/input-event-codes.h
@@ -815,9 +815,39 @@
 #define BTN_TRIGGER_HAPPY39            0x2e6
 #define BTN_TRIGGER_HAPPY40            0x2e7

+#define KEY_RADAR_TRANSMIT             0x2e8
+#define KEY_RADAR_RANGE_UP             0x2e9
+#define KEY_RADAR_RANGE_DOWN           0x2ea
+#define KEY_RADAR_GAIN_UP              0x2eb
+#define KEY_RADAR_GAIN_DOWN            0x2ec
+#define KEY_RADAR_SEA_UP               0x2ed
+#define KEY_RADAR_SEA_DOWN             0x2ee
+#define KEY_RADAR_RAIN_UP              0x2ef
+#define KEY_RADAR_RAIN_DOWN            0x2f0
+#define KEY_RADAR_VRM1_UP              0x2f1
+#define KEY_RADAR_VRM1_DOWN            0x2f2
+#define KEY_RADAR_VRM2_UP              0x2f3
+#define KEY_RADAR_VRM2_DOWN            0x2f4
+#define KEY_RADAR_EBL1_UP              0x2f5
+#define KEY_RADAR_EBL1_DOWN            0x2f6
+#define KEY_RADAR_EBL2_UP              0x2f7
+#define KEY_RADAR_EBL2_DOWN            0x2f8
+#define KEY_RADAR_VRM_TOGGLE           0x2f9
+#define KEY_RADAR_VRM_UP               0x2fa
+#define KEY_RADAR_VRM_DOWN             0x2fb
+#define KEY_RADAR_EBL_TOGGLE           0x2fc
+#define KEY_RADAR_EBL_UP               0x2fd
+#define KEY_RADAR_EBL_DOWN             0x2fe
+#define KEY_RADAR_SCANNER_TOGGLE       0x2ff
+#define KEY_RADAR_SCANNER1             0x300
+#define KEY_RADAR_SCANNER2             0x301
+#define KEY_RADAR_CHANNEL_TOGGLE       0x302
+#define KEY_RADAR_CHANNEL_A            0x303
+#define KEY_RADAR_CHANNEL_B            0x304
+
 /* We avoid low common keys in module aliases so they don't get huge. */
 #define KEY_MIN_INTERESTING    KEY_MUTE
-#define KEY_MAX                        0x2ff
+#define KEY_MAX                        0x3ff
 #define KEY_CNT                        (KEY_MAX+1)

 /*
--
2.43.0


________________________________

CONFIDENTIALITY NOTICE: This email and any attachments are for the sole use of the intended recipient(s) and contain information that may be Garmin confidential and/or Garmin legally privileged. If you have received this email in error, please notify the sender by reply email and delete the message. Any disclosure, copying, distribution or use of this communication (including attachments) by someone other than the intended recipient is prohibited. Thank you.

________________________________

CONFIDENTIALITY NOTICE: This email and any attachments are for the sole use of the intended recipient(s) and contain information that may be Garmin confidential and/or Garmin legally privileged. If you have received this email in error, please notify the sender by reply email and delete the message. Any disclosure, copying, distribution or use of this communication (including attachments) by someone other than the intended recipient is prohibited. Thank you.

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] input: Add marine keycodes for radar control.
  2025-10-13 15:23 [PATCH] input: Add marine keycodes for radar control Hunter Moore
@ 2025-10-13 16:05 ` Dmitry Torokhov
  2025-11-19 16:38   ` Hunter Moore
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Torokhov @ 2025-10-13 16:05 UTC (permalink / raw)
  To: Hunter Moore; +Cc: linux-input, linux-kernel

Hi Hunter,

On Mon, Oct 13, 2025 at 10:23:09AM -0500, Hunter Moore wrote:
> From: Hunter Moore <hunter.moore@garmin.com>
> 
> We are looking into adding some additional keycodes to add support for
> radar control. In total we are adding 29 keycodes which seems to
> exceed the KEY_MAX limit set, so we have also bumped this value to
> 0x3ff to double the available keycodes.

No, we will not be adding these new keys since I do not see any users of
the previously defined ones anywhere, not in kernel sources and not in
the HID specification.

You seem to be creating a purpose-built devices where you control your
userspace, and I do not think the new keycodes will be of any use to
anyone but your specific application. You are also unlikely to be
running anything else besides the software that you are developing on
these devices, so I'd recommend simply reuse parts of the existing key
code space for your purposes (KEY_MACRO*, BTN_TRIGGER_HAPPY*, etc).

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] input: Add marine keycodes for radar control.
  2025-10-13 16:05 ` Dmitry Torokhov
@ 2025-11-19 16:38   ` Hunter Moore
  0 siblings, 0 replies; 3+ messages in thread
From: Hunter Moore @ 2025-11-19 16:38 UTC (permalink / raw)
  To: dmitry.torokhov; +Cc: Hunter.Moore, linux-input, linux-kernel

Hi Dmitry,

It may help if I provide some context of what we are intending on doing.
We are currently updating some of our radar capabilities. One of the goals
necessitates that our radar devices can be controlled by dedicated hardware
controls. You can see this requirement documented in this publicly available
IMO standards document, section 6.1.3[1].

We would like to create as open of a platform as possible to allow 3rd party
manufacturers to create radar control panels. The additional keys are industry
standard functions amoung other commonly available radar control panels, and
not specific to proprietary features. Since radars are important for user
awareness while navigating, we also want to ensure that 3rd party input is
clearly defined.

> No, we will not be adding these new keys since I do not see any users of
> the previously defined ones anywhere, not in kernel sources and not in
> the HID specification.

> You seem to be creating a purpose-built devices where you control your
> userspace, and I do not think the new keycodes will be of any use to
> anyone but your specific application.

We currently allow 3rd party input devices to use the previously defined keys
in our marine ecosystem. These inputs can come from physical user input
devices, networked input devices, or from other applications that run
alongside our application.

> You are also unlikely to be
> running anything else besides the software that you are developing on
> these devices, so I'd recommend simply reuse parts of the existing key
> code space for your purposes (KEY_MACRO*, BTN_TRIGGER_HAPPY*, etc).

The documentation currently states “The KEY_MACRO# codes MUST also NOT be used
as fallback for when no existing KEY_FOO define matches the marking / purpose.
In this case a new KEY_FOO define MUST be added“.

As such, we are apprehensive to repurpose the existing generic keys, for fear
of their purpose changing or unintended user behavior with 3rd party input
devices. If we are unable to get dedicated key codes added, do you have a
suggestion for how to correctly deal with this problem?

[1]: https://wwwcdn.imo.org/localresources/en/KnowledgeCentre/IndexofIMOResolutions/MSCResolutions/MSC.192(79).pdf


________________________________

CONFIDENTIALITY NOTICE: This email and any attachments are for the sole use of the intended recipient(s) and contain information that may be Garmin confidential and/or Garmin legally privileged. If you have received this email in error, please notify the sender by reply email and delete the message. Any disclosure, copying, distribution or use of this communication (including attachments) by someone other than the intended recipient is prohibited. Thank you.

________________________________

CONFIDENTIALITY NOTICE: This email and any attachments are for the sole use of the intended recipient(s) and contain information that may be Garmin confidential and/or Garmin legally privileged. If you have received this email in error, please notify the sender by reply email and delete the message. Any disclosure, copying, distribution or use of this communication (including attachments) by someone other than the intended recipient is prohibited. Thank you.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-11-19 17:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-13 15:23 [PATCH] input: Add marine keycodes for radar control Hunter Moore
2025-10-13 16:05 ` Dmitry Torokhov
2025-11-19 16:38   ` Hunter Moore

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).