023a8ff
Pinchord · pinchord.git · Tickets · Changelog
Branches > pre-release-31-4 > 023a8ff > files
Remove broken yen symbol and properly send shifted symbols in combos
Commit: 023a8ff4d8a887bcb8e02afbf2abc59ad5f8ed51
Parent: 67b4fe9
2 changed files:
generate-mods.clj view file
@@ -120,7 +120,6 @@ "PK" "|" "LR" "!" "F" "*"- "LPKF" "¥" "LP" "\"" "PKFS" "=" "LPK" "?"@@ -128,6 +127,7 @@ ; Unfortunately, Plover does not see the vision ; Will have to implement these separately #_["LRPKF" "€" "^LRPKF" "£"]+ #_["LPKF" "¥"] "PF" "-" "KS" "_" "LRPK" "%"@@ -148,6 +148,10 @@ "LS" {:no-mods "{^}\t" :with-mods "tab"}}}) +(def shifted-symbols+ "Symbols that need to be sent with {#shift(sym)} on Plover."+ #{"^" "&" "@" ":" "$" "#" "|" "!" "*" "\"" "?" "+" "_" "%" "~" "\\{" ">" "\\}"})+ (defn apply-mods [mod-set chord repetitions] (str "{#" (->> (reduce (fn [acc mod]@@ -157,6 +161,16 @@ (str/join " ")) "}")) +(defn apply-symbol-mods+ "Like apply-mods, but takes a symbol, and adds shift to the mods if the symbol+ needs it."+ [mod-set symbol repetitions]+ (apply-mods (if (and (shifted-symbols symbol) (not-any? #{"shift"} mod-set))+ (cons "shift" mod-set)+ mod-set)+ (symbol-name symbol)+ repetitions))+ (def vowel-chords {"A" ["control"] "O" ["shift"]@@ -228,12 +242,11 @@ (def symbols-dict (flatten-map (let [{:keys [starter chords shortcuts mod-shortcuts]} symbols- mapped-symbols (update-vals chords symbol-name) symbols-without-mods (update-vals mod-shortcuts :no-mods) symbols-with-mods (update-vals mod-shortcuts :with-mods) e-repetitions (update-keys repetitions #(str % "e")) repeated= #(str (apply repeated %&) "=")]- [(generate-entries always-attach starter vowel-chords mapped-symbols repetitions apply-mods)+ [(generate-entries always-attach starter vowel-chords chords repetitions apply-symbol-mods) (generate-entries never-attach starter all-mods shortcuts repetitions apply-mods) (generate-entries never-attach starter no-mods symbols-without-mods repetitions repeated) (generate-entries never-attach starter vowel-chords symbols-with-mods repetitions apply-mods)plover_pinchord_31/dictionaries/pinchord-mods-31-3.json view file