Skip to content

Commit

Permalink
v0.4-alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
binarybottle committed Sep 24, 2020
1 parent 3b09529 commit 7c2566e
Showing 1 changed file with 69 additions and 45 deletions.
114 changes: 69 additions & 45 deletions engram_layout.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"\n",
"The [Engram layout](https://github.com/binarybottle/engram-layout) is a keyboard layout optimized for comfortable touch typing in English created by [Arno Klein](https://binarybottle.com), with open source code to create other optimized key layouts.\n",
"\n",
" K U O Y W L G B Q\n",
" H I E A T R S N J \n",
" V Z X C D M F P \n",
" \n",
" Y P O U G D L B Q\n",
" H I E A R T S N J \n",
" V Z X C M K W F\n",
"\n",
"The Shift key accesses characters (top) that look similar to the numbers:\n",
"\n",
" ! = ? + $ @ ^ & % *\n",
Expand All @@ -30,11 +30,11 @@
" ~ ! = ? + $ @ ^ & % * < >\n",
" # 1 2 3 4 5 6 7 8 9 0 [ ] Caps\n",
"\n",
" Tab K U O Y ' \" W L G B Q - /\n",
" Back H I E A , . T R S N J Enter\n",
" Shift V Z X C ( ) D M F P Shift\n",
" Tab Y P O U ' \" G D L B Q - /\n",
" Back H I E A , . R T S N J Enter\n",
" Shift V Z X C ( ) M K W F Shift\n",
"\n",
" Ctrl Fn Cmd Alt Space Alt Ctrl Arrows"
" Ctrl Fn Cmd Alt Space Alt Ctrl Arrows"
]
},
{
Expand Down Expand Up @@ -253,19 +253,31 @@
" \n",
"I applied the same algorithm as in Steps 1 and 3, but to each side separately (to make it computationally tractable), then to the remaining letters, and finally to the command characters on the left side. \n",
"\n",
"The top-scoring full layouts had vowels on the left side and command characters on either side:\n",
" \n",
" J U O Y W S M Q Z score: 0.04264\n",
" H I E A T N R C X \n",
" P K G D L F B V\n",
"The top-scoring layouts had all vowels arranged the same way on the left, with command characters on either right or left, and additional small differences: \n",
"\n",
" Q U O Y W S M J Z score: 0.04264\n",
" H I E A T N R C X \n",
" P K G D L F B V\n",
" K U O Y W D L B Q\n",
" H I E A T S R N J \n",
" V Z X C G M F P\n",
" \n",
"Switching UOY to YOU improves the ease of typing of some of the most frequent bigrams listed below (AY,YO,CY). The only advantage to UOY is that Y is an infrequent letter set in a hard-to-reach key.\n",
"\n",
" K U O Y W L G B Q score: 0.04263\n",
" K Y O U W D L B Q\n",
" H I E A T S R N J \n",
" V Z X C G M F P\n",
"\n",
"Switching SR to RS or TR to RT:\n",
"\n",
" K Y O U W D L B Q\n",
" H I E A T R S N J \n",
" V Z X C D M F P\n",
" V Z X C G M F P\n",
"\n",
" Y P O U G D L B Q\n",
" H I E A T R S N J\n",
" V Z X C M K W F\n",
"\n",
" Y P O U G D L B Q\n",
" H I E A R T S N J \n",
" V Z X C M K W F\n",
" \n",
"### 5. Arrange punctuation marks and characters in easy-to-remember places\n",
"\n",
Expand All @@ -286,9 +298,9 @@
"\n",
"Resulting in:\n",
"\n",
" J U O Y ' \" W S M Q Z\n",
" H I E A , . T N R C X \n",
" P K G D ( ) L F B V\n",
" Y P O U ' \" G D L B Q\n",
" H I E A , . R T S N J \n",
" V Z X C ( ) M K W F\n",
"\n",
"Shift accesses similar-looking characters above the numbers:\n",
"\n",
Expand Down Expand Up @@ -2028,7 +2040,7 @@
"\n",
" Left: Right:\n",
"\n",
" - - O - - S - \n",
" - - O - - S - -\n",
" - I E A T R N -\n",
" - - - - - - - -\n",
" \n",
Expand Down Expand Up @@ -2361,7 +2373,7 @@
},
{
"cell_type": "code",
"execution_count": 64,
"execution_count": 71,
"metadata": {},
"outputs": [
{
Expand All @@ -2371,7 +2383,9 @@
"KUOY-SR 0.04401807153800817\n",
"KUOY-RS 0.043997091340504314\n",
"KYOU-SR 0.0438722799049078\n",
"KYOU-RS 0.043851327891499675\n"
"KYOU-RS 0.043851327891499675\n",
"YPOU-TR 0.043941330819070576\n",
"YPOU-RT 0.04394065704343464\n"
]
}
],
Expand All @@ -2390,7 +2404,13 @@
"print('KYOU-SR', t)\n",
"letters = ['K','Y','O','U', 'H','I','E','A', 'V','Z','X','C', 'W','D','L','B', 'T','R','S','N', 'G','M','F','P']\n",
"t = score_layout(data_matrix, letters, bigrams, verbose=False)\n",
"print('KYOU-RS', t)"
"print('KYOU-RS', t)\n",
"letters = ['Y','P','O','U', 'H','I','E','A', 'V','Z','X','C', 'G','D','L','B', 'R','T','S','N', 'M','K','W','F']\n",
"t = score_layout(data_matrix, letters, bigrams, verbose=False)\n",
"print('YPOU-TR', t)\n",
"letters = ['Y','P','O','U', 'H','I','E','A', 'V','Z','X','C', 'G','D','L','B', 'T','R','S','N', 'M','K','W','F']\n",
"t = score_layout(data_matrix, letters, bigrams, verbose=False)\n",
"print('YPOU-RT', t)"
]
},
{
Expand Down Expand Up @@ -2422,17 +2442,17 @@
" H I E A T S R N J \n",
" V Z X C G M F P\n",
"\n",
"Switching SR to RS:\n",
"Switching SR to RS or TR to RT:\n",
"\n",
" K Y O U W D L B Q\n",
" H I E A T R S N J \n",
" V Z X C G M F P\n",
"\n",
" Y P O U G D L B Q\n",
" H I E A T R S N J \n",
" H I E A T R S N J\n",
" V Z X C M K W F\n",
"\n",
" RT Y P O U G D L B Q\n",
" Y P O U G D L B Q\n",
" H I E A R T S N J \n",
" V Z X C M K W F\n",
"\n",
Expand Down Expand Up @@ -2538,6 +2558,20 @@
"top_permutation5, letter_permutations5, scores5 = permute_and_optimize(keys24, SpeedStrengthFlow24x24, bigrams, all_letters5, move_positions5, fixed_positions5, ntop=10, verbose=False)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"keys24 = [1,2,3,4, 5,6,7,8, 9,10,11,12, 13,14,15,16, 17,18,19,20, 21,22,23,24]\n",
"all_letters5 = \n",
"['Y','P','O','U', 'H','I','E','A', 'V','Z','X','C', 'G','D','L','B', 'R','T','S','N', 'M','K','W','F']\n",
"move_positions5 = [0,1,12,15,20,21,22,23]\n",
"fixed_positions5 = [2,3, 4,5,6,7, 8,9,10,11, 13,14, 16,17,18,19] \n",
"top_permutation5, letter_permutations5, scores5 = permute_and_optimize(keys24, SpeedStrengthFlow24x24, bigrams, all_letters5, move_positions5, fixed_positions5, ntop=10, verbose=False)"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -2677,16 +2711,6 @@
" OY 1020190223 o x"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "raw",
"id": "lSk8xYCfDzS6"
},
"source": [
" \n"
]
},
{
"cell_type": "markdown",
"metadata": {
Expand Down Expand Up @@ -2776,19 +2800,19 @@
"\n",
" # 1 2 3 4 5 6 7 8 9 0 < >\n",
"\n",
" K U O Y ' \" W L G B Q\n",
" H I E A , . T S R N J \n",
" V Z X C ( ) D M F P \n",
" \n",
" Y P O U ' \" G D L B Q\n",
" H I E A , . R T S N J \n",
" V Z X C ( ) M K W F\n",
"\n",
"Shift to access similar-looking characters above the numbers, and swap the Backspace and Caps lock keys:\n",
"\n",
"\n",
" ~ ! = ? + $ @ ^ & % * < >\n",
" # 1 2 3 4 5 6 7 8 9 0 [ ] Caps\n",
"\n",
" Tab K U O Y ' \" W L G B Q - /\n",
" Back H I E A , . T S R N J Enter\n",
" Shift V Z X C ( ) D M F P Shift\n",
" Tab Y P O U ' \" G D L B Q - /\n",
" Back H I E A , . R T S N J Enter\n",
" Shift V Z X C ( ) M K W F Shift\n",
"\n",
" Ctrl Fn Cmd Alt Space Alt Ctrl Arrows\n",
"\n",
Expand Down

0 comments on commit 7c2566e

Please sign in to comment.