Input: document meanings of KEY_SCREEN and KEY_ZOOM
Subsystems (4)
Dmitry Torokhov
maintainerPATCH 1/7 Input: document meanings of KEY_SCREEN and KEY_ZOOM
It is hard to say what KEY_SCREEN and KEY_ZOOM mean, but historically DVB folks have used them to indicate switch to full screen mode. Later, they converged on using KEY_ZOOM to switch into full screen mode and KEY)SCREEN to control aspect ratio (see Documentation/media/uapi/rc/rc-tables.rst).
Let's commit to these uses, and define:
- KEY_FULL_SCREEN (and make KEY_ZOOM its alias)
- KEY_ASPECT_RATIO (and make KEY_SCREEN its alias)
---
Please let me know how we want merge this. Some of patches can be applied independently and I tried marking them as such, but some require new key names from input.h
include/uapi/linux/input-event-codes.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
include/uapi/linux/input-event-codes.h +4 -2
@@ -439,10 +439,12 @@#define KEY_TITLE 0x171#define KEY_SUBTITLE 0x172#define KEY_ANGLE 0x173 -#define KEY_ZOOM 0x174 +#define KEY_FULL_SCREEN 0x174/* AC View Toggle */ +#define KEY_ZOOM KEY_FULL_SCREEN#define KEY_MODE 0x175#define KEY_KEYBOARD 0x176 -#define KEY_SCREEN 0x177 +#define KEY_ASPECT_RATIO 0x177/* HUTRR37: Aspect */ +#define KEY_SCREEN KEY_ASPECT_RATIO#define KEY_PC 0x178/* Media Select Computer */ #define KEY_TV 0x179/* Media Select TV */ #define KEY_TV2 0x17a/* Media Select Cable */
Signature · 1 line
2.20.1.321.g9e740568ce-goog
Dmitry Torokhov
maintainerPATCH 2/7 doc-rst: switch to new names for Full Screen/Aspect keys
We defined better names for keys to activate full screen mode or change aspect ratio (while keeping the existing keycodes to avoid breaking userspace), so let's use them in the document.
--- Documentation/media/uapi/rc/rc-tables.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/media/uapi/rc/rc-tables.rst +2 -2
@@ -616,7 +616,7 @@ the remote via /dev/input/event devices. - .. row 78 - - ``KEY_SCREEN`` + - ``KEY_ASPECT_RATIO`` - Select screen aspect ratio
@@ -624,7 +624,7 @@ the remote via /dev/input/event devices. - .. row 79 - - ``KEY_ZOOM`` + - ``KEY_FULL_SCREEN`` - Put device into zoom/full screen mode
Signature · 1 line
2.20.1.321.g9e740568ce-goog
Dmitry Torokhov
maintainerRe: [PATCH 2/7] [media] doc-rst: switch to new names for Full Screen/Aspect keys
Quoted 7 lines · Dmitry Torokhov
We defined better names for keys to activate full screen mode or change aspect ratio (while keeping the existing keycodes to avoid breaking userspace), so let's use them in the document.
Signed-off-by Dmitry Torokhov <[email protected]>--- Documentation/media/uapi/rc/rc-tables.rst | 4 ++--
Mauro, do you want to take this through your tree or I should pick it up with the patch that does renames in uapi header?
Thanks!
Quoted 27 lines
1 file changed, 2 insertions(+), 2 deletions(-)Documentation/media/uapi/rc/rc-tables.rst +2
-2@@ -616,7 +616,7 @@ the remote via /dev/input/event devices. - .. row 78 - - ``KEY_SCREEN`` + - ``KEY_ASPECT_RATIO`` - Select screen aspect ratio@@ -624,7 +624,7 @@ the remote via /dev/input/event devices. - .. row 79 - - ``KEY_ZOOM`` + - ``KEY_FULL_SCREEN`` - Put device into zoom/full screen modeSignature · 1 line
2.20.1.321.g9e740568ce-goog
Signature · 1 line
Dmitry
Re: [PATCH 2/7] [media] doc-rst: switch to new names for Full Screen/Aspect keys
Em Sun, 17 Feb 2019 23:26:06 -0800
Dmitry Torokhov <[email protected]> escreveu:
Quoted 11 lines · Dmitry Torokhov
Quoted 7 lines
We defined better names for keys to activate full screen mode or change aspect ratio (while keeping the existing keycodes to avoid breaking userspace), so let's use them in the document.
Signed-off-by Dmitry Torokhov <[email protected]>--- Documentation/media/uapi/rc/rc-tables.rst | 4 ++--Mauro, do you want to take this through your tree or I should pick it up with the patch that does renames in uapi header?
Feel free to apply it via your tree. It probably makes sense to keep it with the series that add the new codes.
Quoted 22 lines
Thanks!
Quoted 19 lines
1 file changed, 2 insertions(+), 2 deletions(-)Documentation/media/uapi/rc/rc-tables.rst +1
-1@@ -616,7 +616,7 @@ the remote via /dev/input/event devices. - .. row 78 - - ``KEY_SCREEN`` + - ``KEY_ASPECT_RATIO`` - Select screen aspect ratio@@ -624,7 +624,7 @@ the remote via /dev/input/event devices. - .. row 79
Quoted 9 lines
Quoted 8 lines
Documentation/media/uapi/rc/rc-tables.rst +1
-1- - ``KEY_ZOOM`` + - ``KEY_FULL_SCREEN`` - Put device into zoom/full screen modeSignature · 1 line
2.20.1.321.g9e740568ce-goog
Thanks,
Mauro
Dmitry Torokhov
maintainerPATCH 3/7 HID: input: fix mapping of aspect ratio key
In reply to Dmitry TorokhovAccording to HUTRR37 usage 0x6d from the consumer usage page corresponds to action that selects the next available supported aspect ratio option on a device which outputs or displays video. However KEY_ZOOM means activate "Full Screen" mode, KEY_ASPECT_RATIO should be used instead.
--- drivers/hid/hid-input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/hid-input.c +1 -1
@@ -891,7 +891,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fielcase 0x06a :map_key_clear (KEY_GREEN );break ;case 0x06b :map_key_clear (KEY_BLUE );break ;case 0x06c :map_key_clear (KEY_YELLOW );break ; -case 0x06d :map_key_clear (KEY_ZOOM );break ; +case 0x06d :map_key_clear (KEY_ASPECT_RATIO );break ;case 0x06f :map_key_clear (KEY_BRIGHTNESSUP );break ;case 0x070 :map_key_clear (KEY_BRIGHTNESSDOWN );break ;
Signature · 1 line
2.20.1.321.g9e740568ce-goog
Dmitry Torokhov
maintainerPATCH 4/7 HID: input: add mapping for Expose/Overview key
In reply to Dmitry TorokhovAccording to HUTRR77 usage 0x29f from the consumer page is reserved for the Desktop application to present all running user’s application windows. Linux defines KEY_SCALE to request Compiz Scale (Expose) mode, so let's add the mapping.
---
This can be applied independently.
drivers/hid/hid-input.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/hid/hid-input.c +2 -0
@@ -1030,6 +1030,8 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fielcase 0x2cb :map_key_clear (KEY_KBDINPUTASSIST_ACCEPT );break ;case 0x2cc :map_key_clear (KEY_KBDINPUTASSIST_CANCEL );break ; +case 0x29f :map_key_clear (KEY_SCALE );break ; +default :map_key_clear (KEY_UNKNOWN ); }break ;
Signature · 1 line
2.20.1.321.g9e740568ce-goog
Dmitry Torokhov
maintainerPATCH 5/7 HID: input: add mapping for keyboard Brightness Up/Down/Toggle keys
In reply to Dmitry TorokhovAccording to HUTRR73 usages 0x79, 0x7a and 0x7c from the consumer page correspond to Brightness Up/Down/Toggle keys, so let's add the mappings.
---
This can be applied independently.
drivers/hid/hid-input.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/hid/hid-input.c +4 -0
@@ -900,6 +900,10 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fielcase 0x074 :map_key_clear (KEY_BRIGHTNESS_MAX );break ;case 0x075 :map_key_clear (KEY_BRIGHTNESS_AUTO );break ; +case 0x079 :map_key_clear (KEY_KBDILLUMUP );break ; +case 0x07a :map_key_clear (KEY_KBDILLUMDOWN );break ; +case 0x07c :map_key_clear (KEY_KBDILLUMTOGGLE );break ; +case 0x082 :map_key_clear (KEY_VIDEO_NEXT );break ;case 0x083 :map_key_clear (KEY_LAST );break ;case 0x084 :map_key_clear (KEY_ENTER );break ;
Signature · 1 line
2.20.1.321.g9e740568ce-goog
Dmitry Torokhov
maintainerPATCH 6/7 HID: input: add mapping for "Full Screen" key
In reply to Dmitry TorokhovAccording to HUT 1.12 usage 0x232 from the consumer page is reserved for switching application between full screen and windowed mode, so let's add the mapping.
---
This needs the new key definition.
drivers/hid/hid-input.c | 1 + 1 file changed, 1 insertion(+)
drivers/hid/hid-input.c +1 -0
@@ -1014,6 +1014,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fielcase 0x22d :map_key_clear (KEY_ZOOMIN );break ;case 0x22e :map_key_clear (KEY_ZOOMOUT );break ;case 0x22f :map_key_clear (KEY_ZOOMRESET );break ; +case 0x232 :map_key_clear (KEY_FULL_SCREEN );break ;case 0x233 :map_key_clear (KEY_SCROLLUP );break ;case 0x234 :map_key_clear (KEY_SCROLLDOWN );break ;case 0x238 :map_rel (REL_HWHEEL );break ;
Signature · 1 line
2.20.1.321.g9e740568ce-goog
Dmitry Torokhov
maintainerPATCH 7/7 HID: input: add mapping for "Toggle Display" key
In reply to Dmitry TorokhovAccording to HUT 1.12 usage 0xb5 from the generic desktop page is reserved for switching between external and internal display, so let's add the mapping.
---
This can be applied independently.
drivers/hid/hid-input.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/hid/hid-input.c +8 -0
@@ -677,6 +677,14 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fielbreak ; } +if ((usage->hid &0xf0 ) ==0xb0 ) {/* SC - Display */ +switch (usage->hid &0xf ) { +case 0x05 :map_key_clear (KEY_SWITCHVIDEOMODE );break ; +default : goto ignore; + } +break ; + } +/* * Some lazy vendors declare 255 usages for System Control, * leading to the creation of ABS_X|Y axis and too many others.
Signature · 1 line
2.20.1.321.g9e740568ce-goog
Quoted 10 lines · Dmitry Torokhov
It is hard to say what
KEY_SCREENandKEY_ZOOMmean, but historically DVB folks have used them to indicate switch to full screen mode. Later, they converged on usingKEY_ZOOMto switch into full screen mode and KEY)SCREEN to control aspect ratio (seeDocumentation/media/uapi/rc/rc-tables.rst).Let's commit to these uses, and define:
-
KEY_FULL_SCREEN(and makeKEY_ZOOMits alias)
-KEY_ASPECT_RATIO(and makeKEY_SCREENits alias)
Quoted 6 lines
Signed-off-by Dmitry Torokhov <[email protected]>---
Please let me know how we want merge this. Some of patches can be applied independently and I tried marking them as such, but some require new key names from
input.h
for the HID changes, and feel free to take it through your tree as a whole, I don't expect any major conflicts rising up from this.
Thanks,
Signature · 2 lines
Jiri Kosina SUSE Labs
Benjamin Tissoires
Acked-byQuoted 13 lines · Jiri Kosina
Quoted 10 lines · Dmitry Torokhov
It is hard to say what
KEY_SCREENandKEY_ZOOMmean, but historically DVB folks have used them to indicate switch to full screen mode. Later, they converged on usingKEY_ZOOMto switch into full screen mode and KEY)SCREEN to control aspect ratio (seeDocumentation/media/uapi/rc/rc-tables.rst).Let's commit to these uses, and define:
-
KEY_FULL_SCREEN(and makeKEY_ZOOMits alias)
-KEY_ASPECT_RATIO(and makeKEY_SCREENits alias)
Quoted 8 lines
Quoted 6 lines
Signed-off-by Dmitry Torokhov <[email protected]>---
Please let me know how we want merge this. Some of patches can be applied independently and I tried marking them as such, but some require new key names from
input.hAcked-by Jiri Kosina <[email protected]>
Quoted 3 lines
for the HID changes, and feel free to take it through your tree as a whole, I don't expect any major conflicts rising up from this.
Works for me too. My tests showed no issues, so that's OK from me.
Cheers,
Benjamin
Quoted 7 lines
Thanks,
--
Jiri Kosina
SUSE Labs
Dmitry Torokhov
maintainerQuoted 17 lines · Benjamin Tissoires
Quoted 16 lines · Jiri Kosina
Quoted 13 lines · Dmitry Torokhov
It is hard to say what
KEY_SCREENandKEY_ZOOMmean, but historically DVB folks have used them to indicate switch to full screen mode. Later, they converged on usingKEY_ZOOMto switch into full screen mode and KEY)SCREEN to control aspect ratio (seeDocumentation/media/uapi/rc/rc-tables.rst).Let's commit to these uses, and define:
-
KEY_FULL_SCREEN(and makeKEY_ZOOMits alias)
-KEY_ASPECT_RATIO(and makeKEY_SCREENits alias)Signed-off-by Dmitry Torokhov <[email protected]>---
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Please let me know how we want merge this. Some of patches can be applied independently and I tried marking them as such, but some require new key names from
input.hAcked-by Jiri Kosina <[email protected]>
Mauro, any objections on pushing the media doc patch through my tree?
Thanks.
Signature · 1 line
Dmitry
Em Fri, 18 Jan 2019 15:30:31 -0800
Dmitry Torokhov <[email protected]> escreveu:
Quoted 11 lines
It is hard to say what
KEY_SCREENandKEY_ZOOMmean, but historically DVB folks have used them to indicate switch to full screen mode. Later, they converged on usingKEY_ZOOMto switch into full screen mode and KEY)SCREEN to control aspect ratio (seeDocumentation/media/uapi/rc/rc-tables.rst).Let's commit to these uses, and define:
-
KEY_FULL_SCREEN(and makeKEY_ZOOMits alias)
-KEY_ASPECT_RATIO(and makeKEY_SCREENits alias)Signed-off-by Dmitry Torokhov <[email protected]>
Feel free to apply via your tree.
Quoted 18 lines
---
Please let me know how we want merge this. Some of patches can be applied independently and I tried marking them as such, but some require new key names from
input.hinclude/uapi/linux/input-event-codes.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)include/uapi/linux/input-event-codes.h +0
-1@@ -439,10 +439,12 @@#define KEY_TITLE 0x171#define KEY_SUBTITLE 0x172#define KEY_ANGLE 0x173 -#define KEY_ZOOM 0x174
include/uapi/linux/input-event-codes.h line 450
Quoted 10 lines
include/uapi/linux/input-event-codes.h +4
-1+#define KEY_FULL_SCREEN 0x174/* AC View Toggle */ +#define KEY_ZOOM KEY_FULL_SCREEN#define KEY_MODE 0x175#define KEY_KEYBOARD 0x176 -#define KEY_SCREEN 0x177 +#define KEY_ASPECT_RATIO 0x177/* HUTRR37: Aspect */ +#define KEY_SCREEN KEY_ASPECT_RATIO#define KEY_PC 0x178/* Media Select Computer */ #define KEY_TV 0x179/* Media Select TV */ #define KEY_TV2 0x17a/* Media Select Cable */
Thanks,
Mauro