about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWeirdTreeThing <bradyn127@protonmail.com>2024-03-12 23:32:28 -0400
committerWeirdTreeThing <bradyn127@protonmail.com>2024-03-12 23:32:46 -0400
commit1cf87a401dfc99d518ef84965ce3cb83993a3f25 (patch)
tree6a5ae48446f1d0d197c6b0a96d1b83c21145ed45
parent8fd787cf4b3cf959dc4067e278f4cce15f1328b9 (diff)
Fix arm?
I forgot what this does lol
-rw-r--r--[-rwxr-xr-x]cros-keyboard-map.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/cros-keyboard-map.py b/cros-keyboard-map.py
index ec791c2..ce9d7db 100755..100644
--- a/cros-keyboard-map.py
+++ b/cros-keyboard-map.py
@@ -52,7 +52,6 @@ vivaldi_keys = {
         "114": "volumedown",
         "115": "volumeup",
         "99" : "print",
-        "142": "coffee",
     }
 }
 
@@ -66,10 +65,7 @@ def get_dt_layout():
     keys = []
     keycodes = []
 
-    try:
-        fdt = libfdt.Fdt(open("/sys/firmware/fdt", "rb").read())
-    except:
-        return ""
+    fdt = libfdt.Fdt(open("/sys/firmware/fdt", "rb").read())
     currentnode = fdt.first_subnode(0)
 
     while True:
@@ -163,8 +159,7 @@ def main():
                         help="use functional keys by default and media keys when super is held")
     args = vars(parser.parse_args())
 
-    if get_arch() != "x86_64":
-        import libfdt
+    
 
     physmap = get_physmap_data()
     if not physmap:
@@ -179,4 +174,6 @@ def main():
         conf.write(config)
 
 if __name__ == "__main__":
+    if get_arch() != "x86_64":
+        import libfdt
     main()