From 68c5c42a08665b6315c4159959db97011afc6c00 Mon Sep 17 00:00:00 2001 From: WeirdTreeThing Date: Mon, 4 Sep 2023 07:08:20 -0400 Subject: Map fullscreen (zoom) to f11 Most programs will do nothing then the zoom key is pressed --- cros-keyboard-map.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/cros-keyboard-map.py b/cros-keyboard-map.py index a47a2c4..17516a5 100755 --- a/cros-keyboard-map.py +++ b/cros-keyboard-map.py @@ -57,14 +57,24 @@ def create_keyd_config(physmap): i = 0 for scancode in physmap: i += 1 - config += f"f{i} = {vivaldi_scancode_to_keyd(scancode)}\n" + # Map zoom to f11 since most applications wont listen to zoom + if vivaldi_scancode_to_keyd(scancode) == "zoom": + mapping = "f11" + else: + mapping = vivaldi_scancode_to_keyd(scancode) + config += f"f{i} = {mapping}\n" config += "\n" # make vivaldi keys act like vivaldi keys when super isn't held i = 0 for scancode in physmap: i += 1 - config += f"{vivaldi_scancode_to_keyd(scancode)} = {vivaldi_scancode_to_keyd(scancode)}\n" + # Map zoom to f11 since most applications wont listen to zoom + if vivaldi_scancode_to_keyd(scancode) == "zoom": + mapping = "f11" + else: + mapping = vivaldi_scancode_to_keyd(scancode) + config += f"{vivaldi_scancode_to_keyd(scancode)} = {mapping}\n" # map lock button to coffee config += "\nf13=coffee\nsleep=coffee\n" -- cgit 1.4.1-2-gfad0