Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix:world linux compose for ¡ ¿ œ #30

Closed
wants to merge 1 commit into from

Conversation

emiltoacs
Copy link

@emiltoacs emiltoacs commented Jan 6, 2025

add a world_o_oe macro for œ used in french,
add a Linux compose key combination for inverted exclamation point ¡
correct the Linux compose key for question mark left ¿

@emiltoacs emiltoacs force-pushed the fix-compose-punct branch 2 times, most recently from b78c110 to 47616f2 Compare January 6, 2025 22:26
@emiltoacs emiltoacs changed the title fix:world linux compose for ¡ ¿ fix:world linux compose for ¡ ¿ œ Jan 6, 2025
@sunaku
Copy link
Owner

sunaku commented Jan 7, 2025

Thanks for this patch. For completeness, could you please also check in the resulting changes to the keymap.dtsi file that arise from running the provided ./rake script?

@emiltoacs
Copy link
Author

The keymap.dtsi works flawlessly there are just the right additions

@@ -4255,7 +4255,12 @@ UNICODE_MORPH_MODS
   };
   UNICODE(world_exclaim_left_macro, /* ¡ */
     #if OPERATING_SYSTEM == 'L'
+      #ifdef WORLD_USE_COMPOSE
+      #define WORLD_USE_COMPOSE_FOR_world_exclaim_left
+      COMPOSE_SEQ_LINUX(&kp EXCL &kp EXCL)
+      #else
       UNICODE_SEQ_LINUX(&kp _NA &kp _N1)
+      #endif
     #elif OPERATING_SYSTEM == 'M'
       #ifdef WORLD_USE_COMPOSE
       #define WORLD_USE_COMPOSE_FOR_world_exclaim_left
@@ -4288,7 +4293,7 @@ UNICODE_MORPH_MODS
     #if OPERATING_SYSTEM == 'L'
       #ifdef WORLD_USE_COMPOSE
       #define WORLD_USE_COMPOSE_FOR_world_question_left
-      COMPOSE_SEQ_LINUX(&kp EXCL &kp EXCL)
+      COMPOSE_SEQ_LINUX(&kp QMARK &kp QMARK)
       #else
       UNICODE_SEQ_LINUX(&kp _NB &kp _NF)
       #endif
@@ -6217,6 +6222,54 @@ UNICODE_MORPH_MODS
     bindings = <&world_o_slash_lower>, <&world_o_slash_upper>;
     mods = <MOD_LSFT>;
   };
+  UNICODE(world_o_oe_lower_macro, /* œ */
+    #if OPERATING_SYSTEM == 'L'
+      UNICODE_SEQ_LINUX(&kp _N1 &kp _N5 &kp _N3)
+    #elif OPERATING_SYSTEM == 'M'
+      UNICODE_SEQ_MACOS(&kp _N0 &kp _N1 &kp _N5 &kp _N3)
+    #elif OPERATING_SYSTEM == 'W'
+      UNICODE_SEQ_WINDOWS(&kp _N0 &kp _N1 &kp _N5 &kp _N3)
+    #endif
+  )
+  world_o_oe_lower: world_o_oe_lower {
+    compatible = "zmk,behavior-mod-morph";
+    #binding-cells = <0>;
+    bindings = <&world_o_oe_lower_macro>, <&world_o_oe_lower_macro>;
+    mods = <(~(
+#ifdef WORLD_USE_COMPOSE_FOR_world_o_oe_lower
+COMPOSE_MORPH_MODS
+#else
+UNICODE_MORPH_MODS
+#endif
+))>;
+  };
+  UNICODE(world_o_oe_upper_macro, /* Œ */
+    #if OPERATING_SYSTEM == 'L'
+      UNICODE_SEQ_LINUX(&kp _N1 &kp _N5 &kp _N2)
+    #elif OPERATING_SYSTEM == 'M'
+      UNICODE_SEQ_MACOS(&kp _N0 &kp _N1 &kp _N5 &kp _N2)
+    #elif OPERATING_SYSTEM == 'W'
+      UNICODE_SEQ_WINDOWS(&kp _N0 &kp _N1 &kp _N5 &kp _N2)
+    #endif
+  )
+  world_o_oe_upper: world_o_oe_upper {
+    compatible = "zmk,behavior-mod-morph";
+    #binding-cells = <0>;
+    bindings = <&world_o_oe_upper_macro>, <&world_o_oe_upper_macro>;
+    mods = <(~(
+#ifdef WORLD_USE_COMPOSE_FOR_world_o_oe_upper
+COMPOSE_MORPH_MODS
+#else
+UNICODE_MORPH_MODS
+#endif
+))>;
+  };
+  world_o_oe: world_o_oe {
+    compatible = "zmk,behavior-mod-morph";
+    #binding-cells = <0>;
+    bindings = <&world_o_oe_lower>, <&world_o_oe_upper>;
+    mods = <MOD_LSFT>;
+  };
   UNICODE(world_u_acute_lower_macro, /* ú */
     #if OPERATING_SYSTEM == 'L'
       #ifdef WORLD_USE_COMPOSE

@sunaku
Copy link
Owner

sunaku commented Jan 7, 2025

Thanks for the diff 😅 but would you mind committing that to your pull request branch and pushing? I would like to have all of your changes (direct or implied) in this pull request so that I can merge it in one swoop and have everything attributed to you.

add a world_o_oe macro for œ used in french,
add a Linux compose key combination for inverted exclamation point ¡
correct the Linux compose key for question mark left ¿
@emiltoacs
Copy link
Author

Aaaaaa ok sorry now it is done. The commit with the modified files due to the rake tasks. Sorry for the misunderstanding.

sunaku pushed a commit that referenced this pull request Jan 8, 2025
add a world_o_oe macro for œ used in french,
add a Linux compose key combination for inverted exclamation point ¡
correct the Linux compose key for question mark left ¿
@sunaku
Copy link
Owner

sunaku commented Jan 8, 2025

Merged into next branch now, thanks! 🙇

@sunaku sunaku closed this Jan 8, 2025
@emiltoacs emiltoacs deleted the fix-compose-punct branch January 8, 2025 06:45
sunaku pushed a commit that referenced this pull request Jan 8, 2025
add a world_o_oe macro for œ used in french,
add a Linux compose key combination for inverted exclamation point ¡
correct the Linux compose key for question mark left ¿
sunaku pushed a commit that referenced this pull request Jan 8, 2025
add a world_o_oe macro for œ used in french,
add a Linux compose key combination for inverted exclamation point ¡
correct the Linux compose key for question mark left ¿
sunaku pushed a commit that referenced this pull request Jan 9, 2025
add a world_o_oe macro for œ used in french,
add a Linux compose key combination for inverted exclamation point ¡
correct the Linux compose key for question mark left ¿
sunaku pushed a commit that referenced this pull request Jan 13, 2025
add a world_o_oe macro for œ used in french,
add a Linux compose key combination for inverted exclamation point ¡
correct the Linux compose key for question mark left ¿
@sunaku
Copy link
Owner

sunaku commented Jan 14, 2025

Oops, we forgot to add compose key sequences for the new œ and Œ characters! 😅 I've added them now in commit 2eb87fe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants