aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards/gboards/combos
diff options
context:
space:
mode:
authorJeremy Bernhardt <jeremythegeek@gmail.com>2020-05-04 10:49:47 -0600
committerGitHub <noreply@github.com>2020-05-04 12:49:47 -0400
commit15e84f79f177d92e0faeb5e424a48506489eb955 (patch)
tree8936f6087b900274928107b4fbf27a3bba149d92 /keyboards/gboards/combos
parent6f30b402a285ddecce9b6f5b002a649f775225d2 (diff)
downloadfirmware-15e84f79f177d92e0faeb5e424a48506489eb955.tar.gz
firmware-15e84f79f177d92e0faeb5e424a48506489eb955.tar.bz2
firmware-15e84f79f177d92e0faeb5e424a48506489eb955.zip
gBoards Common (#8921)
Co-Authored-By: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'keyboards/gboards/combos')
-rw-r--r--keyboards/gboards/combos/_generator/input.json99
-rw-r--r--keyboards/gboards/combos/_generator/main.go60
-rw-r--r--keyboards/gboards/combos/eng-combos.def97
-rw-r--r--keyboards/gboards/combos/germ-mouse-keys.def2
-rw-r--r--keyboards/gboards/combos/germ-vim-helpers.def10
-rw-r--r--keyboards/gboards/combos/readme.md7
6 files changed, 275 insertions, 0 deletions
diff --git a/keyboards/gboards/combos/_generator/input.json b/keyboards/gboards/combos/_generator/input.json
new file mode 100644
index 000000000..022c4690e
--- /dev/null
+++ b/keyboards/gboards/combos/_generator/input.json
@@ -0,0 +1,99 @@
+{
+"the ":"TH",
+"of ":"OF",
+"and ":"ND",
+"to ":"TO",
+"in ":"IN",
+"for ":"FR",
+"is ":"IS",
+"on ":"ON",
+"that ":"TA",
+"by ":"BY",
+"this ":"TS",
+"with ":"WT",
+"you ":"YU",
+"it ":"IT",
+"not ":"NT",
+"or ":"OR",
+"be ":"BE",
+"are ":"AR",
+"from ":"FE",
+"at ":"AD",
+"as ":"AS",
+"your ":"UR",
+"all ":"AL",
+"have ":"HV",
+"new ":"NU",
+"more ":"MR",
+"an ":"AN",
+"was ":"WS",
+"we ":"WI",
+"will ":"WL",
+"home ":"HM",
+"can ":"CN",
+"us ":"US",
+"about ":"AB",
+"if ":"IF",
+"page ":"PG",
+"my ":"MK",
+"has ":"HS",
+"search ":"SR",
+"free ":"FH",
+"but ":"BU",
+"our ":"OU",
+"one ":"WU",
+"other ":"OH",
+"do ":"DO",
+"no ":"NK",
+"information ":"IR",
+"time ":"TM",
+"they ":"TY",
+"site ":"SY",
+"he ":"HE",
+"up ":"UP",
+"may ":"MA",
+"what ":"WA",
+"which ":"WH",
+"their ":"TR",
+"news ":"NS",
+"out ":"OG",
+"use ":"UE",
+"any ":"NE",
+"there ":"TE",
+"see ":"SE",
+"only ":"LY",
+"so ":"SO",
+"his ":"HI",
+"when ":"WN",
+"contact ":"KT",
+"here ":"HR",
+"business ":"BS",
+"who ":"WO",
+"web ":"WB",
+"also ":"LS",
+"now ":"NQ",
+"help ":"HL",
+"get ":"GT",
+"view ":"VU",
+"online ":"LN",
+"first ":"FS",
+"been ":"BN",
+"would ":"WD",
+"how ":"HU",
+"were ":"WR",
+"me ":"ME",
+"some ":"SM",
+"these ":"TZ",
+"click ":"CL",
+"its ":"IZ",
+"like ":"LK",
+"service ":"SV",
+"than ":"HN",
+"find ":"FN",
+"price ":"PR",
+"date ":"DT",
+"back ":"BK",
+"top ":"TP",
+"people ":"PE",
+"had ":"HD"
+}
diff --git a/keyboards/gboards/combos/_generator/main.go b/keyboards/gboards/combos/_generator/main.go
new file mode 100644
index 000000000..043c8b78c
--- /dev/null
+++ b/keyboards/gboards/combos/_generator/main.go
@@ -0,0 +1,60 @@
+// Package for taking a mapping of words to keys and outputing a
+// combo engine commpatible def
+
+package main
+
+import (
+ "io/ioutil"
+ "fmt"
+ "encoding/json"
+ "os"
+ "sort"
+ "strings"
+ "hash/crc64"
+ //"encoding/base64"
+)
+
+func main() {
+ // Show Usage
+ if len(os.Args) < 3 {
+ fmt.Println("Usage: ./keymap-gen inputfile outfile")
+ fmt.Println("Outputs dict in current dir")
+ return
+ }
+
+ // Read the source
+ data, err := ioutil.ReadFile(os.Args[1])
+ if err != nil {
+ panic(err)
+ }
+
+ // Unbundle Data
+ var FullDict map[string]string
+ var output []string
+ json.Unmarshal(data, &FullDict)
+
+ // Loop over entries and store
+ for i,v := range FullDict {
+ // This checks for colllisions, Generates hash
+ hash := crc64.Checksum([]byte(v), crc64.MakeTable(crc64.ECMA))
+ hashStr := fmt.Sprintf("txt_%x", hash)[:10]
+
+ // Format keys into combo
+ var keys string
+ for _, k := range(v) {
+ keys += fmt.Sprintf("KC_%v, ", string(k))
+
+ }
+ keys = keys[:len(keys)-2]
+
+ // Append to output
+ spacer := strings.Repeat(" ", 15-len(i))
+ output = append(output, fmt.Sprintf("SUBS(%v, %v\"%v\", %v)\n", hashStr, spacer, i, keys))
+ }
+
+
+ sort.Slice(output, func (i,j int) bool {
+ return strings.Count(output[i], " ") > strings.Count(output[j], " ")
+ })
+ ioutil.WriteFile(os.Args[2], []byte(strings.Join(output, "")), 0555)
+}
diff --git a/keyboards/gboards/combos/eng-combos.def b/keyboards/gboards/combos/eng-combos.def
new file mode 100644
index 000000000..6f4a8a91e
--- /dev/null
+++ b/keyboards/gboards/combos/eng-combos.def
@@ -0,0 +1,97 @@
+SUBS(txt_eaff0b, "me ", KC_M, KC_E)
+SUBS(txt_c96f2b, "as ", KC_A, KC_S)
+SUBS(txt_ff3afa, "we ", KC_W, KC_I)
+SUBS(txt_d94d16, "is ", KC_I, KC_S)
+SUBS(txt_7f6b3b, "he ", KC_H, KC_E)
+SUBS(txt_377110, "by ", KC_B, KC_Y)
+SUBS(txt_8d5585, "to ", KC_T, KC_O)
+SUBS(txt_888e33, "at ", KC_A, KC_D)
+SUBS(txt_ad11fe, "do ", KC_D, KC_O)
+SUBS(txt_285619, "us ", KC_U, KC_S)
+SUBS(txt_e537af, "it ", KC_I, KC_T)
+SUBS(txt_9b89bf, "in ", KC_I, KC_N)
+SUBS(txt_b11346, "so ", KC_S, KC_O)
+SUBS(txt_8bab82, "an ", KC_A, KC_N)
+SUBS(txt_6f31f3, "no ", KC_N, KC_K)
+SUBS(txt_f32605, "on ", KC_O, KC_N)
+SUBS(txt_2cce07, "or ", KC_O, KC_R)
+SUBS(txt_48782c, "of ", KC_O, KC_F)
+SUBS(txt_c69bf5, "be ", KC_B, KC_E)
+SUBS(txt_6c2838, "if ", KC_I, KC_F)
+SUBS(txt_6ffc63, "up ", KC_U, KC_P)
+SUBS(txt_920a79, "my ", KC_M, KC_K)
+SUBS(txt_f31a7f, "his ", KC_H, KC_I)
+SUBS(txt_da994d, "use ", KC_U, KC_E)
+SUBS(txt_b12f3c, "the ", KC_T, KC_H)
+SUBS(txt_4607a4, "for ", KC_F, KC_R)
+SUBS(txt_a4eacd, "and ", KC_N, KC_D)
+SUBS(txt_6a5f20, "new ", KC_N, KC_U)
+SUBS(txt_bb0054, "but ", KC_B, KC_U)
+SUBS(txt_7a4167, "are ", KC_A, KC_R)
+SUBS(txt_765d98, "you ", KC_Y, KC_U)
+SUBS(txt_ed01f2, "one ", KC_W, KC_U)
+SUBS(txt_b236f7, "see ", KC_S, KC_E)
+SUBS(txt_3eb659, "our ", KC_O, KC_U)
+SUBS(txt_2f09ac, "how ", KC_H, KC_U)
+SUBS(txt_706e0f, "who ", KC_W, KC_O)
+SUBS(txt_9dba28, "get ", KC_G, KC_T)
+SUBS(txt_3b151a, "top ", KC_T, KC_P)
+SUBS(txt_17c481, "any ", KC_N, KC_E)
+SUBS(txt_227971, "can ", KC_C, KC_N)
+SUBS(txt_4f3107, "web ", KC_W, KC_B)
+SUBS(txt_7f2fb4, "all ", KC_A, KC_L)
+SUBS(txt_8184ea, "was ", KC_W, KC_S)
+SUBS(txt_8da46f, "has ", KC_H, KC_S)
+SUBS(txt_cc4577, "had ", KC_H, KC_D)
+SUBS(txt_b7a9ce, "out ", KC_O, KC_G)
+SUBS(txt_9dc2dd, "its ", KC_I, KC_Z)
+SUBS(txt_d9716c, "not ", KC_N, KC_T)
+SUBS(txt_118fe3, "now ", KC_N, KC_Q)
+SUBS(txt_912fc8, "may ", KC_M, KC_A)
+SUBS(txt_769008, "been ", KC_B, KC_N)
+SUBS(txt_43dc12, "site ", KC_S, KC_Y)
+SUBS(txt_c6e300, "like ", KC_L, KC_K)
+SUBS(txt_bdfe53, "with ", KC_W, KC_T)
+SUBS(txt_c34043, "when ", KC_W, KC_N)
+SUBS(txt_b7ed41, "find ", KC_F, KC_N)
+SUBS(txt_f5a0f7, "that ", KC_T, KC_A)
+SUBS(txt_3be4f0, "help ", KC_H, KC_L)
+SUBS(txt_32aaa6, "were ", KC_W, KC_R)
+SUBS(txt_4cd926, "also ", KC_L, KC_S)
+SUBS(txt_be6e87, "back ", KC_B, KC_K)
+SUBS(txt_5a3966, "view ", KC_V, KC_U)
+SUBS(txt_89b7d9, "what ", KC_W, KC_A)
+SUBS(txt_4ffc97, "only ", KC_L, KC_Y)
+SUBS(txt_e50bd5, "news ", KC_N, KC_S)
+SUBS(txt_7cbf60, "this ", KC_T, KC_S)
+SUBS(txt_ab1e13, "more ", KC_M, KC_R)
+SUBS(txt_459770, "some ", KC_S, KC_M)
+SUBS(txt_37c475, "will ", KC_W, KC_L)
+SUBS(txt_88cabc, "home ", KC_H, KC_M)
+SUBS(txt_38b9b4, "free ", KC_F, KC_H)
+SUBS(txt_7f9ad1, "they ", KC_T, KC_Y)
+SUBS(txt_79d1b3, "time ", KC_T, KC_M)
+SUBS(txt_6081a2, "date ", KC_D, KC_T)
+SUBS(txt_bb894b, "page ", KC_P, KC_G)
+SUBS(txt_455ae0, "have ", KC_H, KC_V)
+SUBS(txt_cf60c6, "than ", KC_H, KC_N)
+SUBS(txt_3e8a23, "here ", KC_H, KC_R)
+SUBS(txt_9b7855, "your ", KC_U, KC_R)
+SUBS(txt_7e6bc5, "from ", KC_F, KC_E)
+SUBS(txt_d6fd47, "click ", KC_C, KC_L)
+SUBS(txt_7c72f0, "other ", KC_O, KC_H)
+SUBS(txt_f529e8, "first ", KC_F, KC_S)
+SUBS(txt_c065f2, "would ", KC_W, KC_D)
+SUBS(txt_3830ab, "these ", KC_T, KC_Z)
+SUBS(txt_cf912c, "their ", KC_T, KC_R)
+SUBS(txt_4c14b6, "which ", KC_W, KC_H)
+SUBS(txt_eec659, "price ", KC_P, KC_R)
+SUBS(txt_7dac6e, "about ", KC_A, KC_B)
+SUBS(txt_8e7034, "there ", KC_T, KC_E)
+SUBS(txt_e1d8f7, "online ", KC_L, KC_N)
+SUBS(txt_4f0d7d, "people ", KC_P, KC_E)
+SUBS(txt_f3d7ef, "search ", KC_S, KC_R)
+SUBS(txt_4ce55c, "contact ", KC_K, KC_T)
+SUBS(txt_88072c, "service ", KC_S, KC_V)
+SUBS(txt_3454a1, "business ", KC_B, KC_S)
+SUBS(txt_6a635a, "information ", KC_I, KC_R)
diff --git a/keyboards/gboards/combos/germ-mouse-keys.def b/keyboards/gboards/combos/germ-mouse-keys.def
new file mode 100644
index 000000000..c0aff412e
--- /dev/null
+++ b/keyboards/gboards/combos/germ-mouse-keys.def
@@ -0,0 +1,2 @@
+COMB(gbClick, KC_BTN1, KC_G, KC_B)
+COMB(fvClick, KC_BTN2, KC_F, KC_V)
diff --git a/keyboards/gboards/combos/germ-vim-helpers.def b/keyboards/gboards/combos/germ-vim-helpers.def
new file mode 100644
index 000000000..3e2b45db1
--- /dev/null
+++ b/keyboards/gboards/combos/germ-vim-helpers.def
@@ -0,0 +1,10 @@
+// Vim-Mode combos
+
+COMB(weEsc, KC_ESC, KC_W, KC_E)
+COMB(sdBspc, KC_BSPC, KC_S, KC_D)
+COMB(dfTab, KC_TAB, KC_D, KC_F)
+COMB(cvEnt, KC_ENT, KC_C, KC_V)
+COMB(uiEsc, KC_ESC, KC_U, KC_I)
+COMB(jkCol, KC_COLN, KC_J, KC_K)
+COMB(hnEnt, KC_ENT, KC_H, KC_N)
+
diff --git a/keyboards/gboards/combos/readme.md b/keyboards/gboards/combos/readme.md
new file mode 100644
index 000000000..ca4b169c1
--- /dev/null
+++ b/keyboards/gboards/combos/readme.md
@@ -0,0 +1,7 @@
+# Combo library!
+
+This is a list of all the currently available dictionaries that are available for inclusion.
+Please submit a PR with yours! If you have a bunch prepend your username to the front. i.e.
+`germ-vim-helpers`
+
+Thanks!