Skip to content

Commit 7c2566e

Browse files
committed
v0.4-alpha
1 parent 3b09529 commit 7c2566e

File tree

1 file changed

+69
-45
lines changed

1 file changed

+69
-45
lines changed

engram_layout.ipynb

Lines changed: 69 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
"\n",
1212
"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",
1313
"\n",
14-
" K U O Y W L G B Q\n",
15-
" H I E A T R S N J \n",
16-
" V Z X C D M F P \n",
17-
" \n",
14+
" Y P O U G D L B Q\n",
15+
" H I E A R T S N J \n",
16+
" V Z X C M K W F\n",
17+
"\n",
1818
"The Shift key accesses characters (top) that look similar to the numbers:\n",
1919
"\n",
2020
" ! = ? + $ @ ^ & % *\n",
@@ -30,11 +30,11 @@
3030
" ~ ! = ? + $ @ ^ & % * < >\n",
3131
" # 1 2 3 4 5 6 7 8 9 0 [ ] Caps\n",
3232
"\n",
33-
" Tab K U O Y ' \" W L G B Q - /\n",
34-
" Back H I E A , . T R S N J Enter\n",
35-
" Shift V Z X C ( ) D M F P Shift\n",
33+
" Tab Y P O U ' \" G D L B Q - /\n",
34+
" Back H I E A , . R T S N J Enter\n",
35+
" Shift V Z X C ( ) M K W F Shift\n",
3636
"\n",
37-
" Ctrl Fn Cmd Alt Space Alt Ctrl Arrows"
37+
" Ctrl Fn Cmd Alt Space Alt Ctrl Arrows"
3838
]
3939
},
4040
{
@@ -253,19 +253,31 @@
253253
" \n",
254254
"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",
255255
"\n",
256-
"The top-scoring full layouts had vowels on the left side and command characters on either side:\n",
257-
" \n",
258-
" J U O Y W S M Q Z score: 0.04264\n",
259-
" H I E A T N R C X \n",
260-
" P K G D L F B V\n",
256+
"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",
261257
"\n",
262-
" Q U O Y W S M J Z score: 0.04264\n",
263-
" H I E A T N R C X \n",
264-
" P K G D L F B V\n",
258+
" K U O Y W D L B Q\n",
259+
" H I E A T S R N J \n",
260+
" V Z X C G M F P\n",
261+
" \n",
262+
"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",
265263
"\n",
266-
" K U O Y W L G B Q score: 0.04263\n",
264+
" K Y O U W D L B Q\n",
265+
" H I E A T S R N J \n",
266+
" V Z X C G M F P\n",
267+
"\n",
268+
"Switching SR to RS or TR to RT:\n",
269+
"\n",
270+
" K Y O U W D L B Q\n",
267271
" H I E A T R S N J \n",
268-
" V Z X C D M F P\n",
272+
" V Z X C G M F P\n",
273+
"\n",
274+
" Y P O U G D L B Q\n",
275+
" H I E A T R S N J\n",
276+
" V Z X C M K W F\n",
277+
"\n",
278+
" Y P O U G D L B Q\n",
279+
" H I E A R T S N J \n",
280+
" V Z X C M K W F\n",
269281
" \n",
270282
"### 5. Arrange punctuation marks and characters in easy-to-remember places\n",
271283
"\n",
@@ -286,9 +298,9 @@
286298
"\n",
287299
"Resulting in:\n",
288300
"\n",
289-
" J U O Y ' \" W S M Q Z\n",
290-
" H I E A , . T N R C X \n",
291-
" P K G D ( ) L F B V\n",
301+
" Y P O U ' \" G D L B Q\n",
302+
" H I E A , . R T S N J \n",
303+
" V Z X C ( ) M K W F\n",
292304
"\n",
293305
"Shift accesses similar-looking characters above the numbers:\n",
294306
"\n",
@@ -2028,7 +2040,7 @@
20282040
"\n",
20292041
" Left: Right:\n",
20302042
"\n",
2031-
" - - O - - S - \n",
2043+
" - - O - - S - -\n",
20322044
" - I E A T R N -\n",
20332045
" - - - - - - - -\n",
20342046
" \n",
@@ -2361,7 +2373,7 @@
23612373
},
23622374
{
23632375
"cell_type": "code",
2364-
"execution_count": 64,
2376+
"execution_count": 71,
23652377
"metadata": {},
23662378
"outputs": [
23672379
{
@@ -2371,7 +2383,9 @@
23712383
"KUOY-SR 0.04401807153800817\n",
23722384
"KUOY-RS 0.043997091340504314\n",
23732385
"KYOU-SR 0.0438722799049078\n",
2374-
"KYOU-RS 0.043851327891499675\n"
2386+
"KYOU-RS 0.043851327891499675\n",
2387+
"YPOU-TR 0.043941330819070576\n",
2388+
"YPOU-RT 0.04394065704343464\n"
23752389
]
23762390
}
23772391
],
@@ -2390,7 +2404,13 @@
23902404
"print('KYOU-SR', t)\n",
23912405
"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",
23922406
"t = score_layout(data_matrix, letters, bigrams, verbose=False)\n",
2393-
"print('KYOU-RS', t)"
2407+
"print('KYOU-RS', t)\n",
2408+
"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",
2409+
"t = score_layout(data_matrix, letters, bigrams, verbose=False)\n",
2410+
"print('YPOU-TR', t)\n",
2411+
"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",
2412+
"t = score_layout(data_matrix, letters, bigrams, verbose=False)\n",
2413+
"print('YPOU-RT', t)"
23942414
]
23952415
},
23962416
{
@@ -2422,17 +2442,17 @@
24222442
" H I E A T S R N J \n",
24232443
" V Z X C G M F P\n",
24242444
"\n",
2425-
"Switching SR to RS:\n",
2445+
"Switching SR to RS or TR to RT:\n",
24262446
"\n",
24272447
" K Y O U W D L B Q\n",
24282448
" H I E A T R S N J \n",
24292449
" V Z X C G M F P\n",
24302450
"\n",
24312451
" Y P O U G D L B Q\n",
2432-
" H I E A T R S N J \n",
2452+
" H I E A T R S N J\n",
24332453
" V Z X C M K W F\n",
24342454
"\n",
2435-
" RT Y P O U G D L B Q\n",
2455+
" Y P O U G D L B Q\n",
24362456
" H I E A R T S N J \n",
24372457
" V Z X C M K W F\n",
24382458
"\n",
@@ -2538,6 +2558,20 @@
25382558
"top_permutation5, letter_permutations5, scores5 = permute_and_optimize(keys24, SpeedStrengthFlow24x24, bigrams, all_letters5, move_positions5, fixed_positions5, ntop=10, verbose=False)"
25392559
]
25402560
},
2561+
{
2562+
"cell_type": "code",
2563+
"execution_count": null,
2564+
"metadata": {},
2565+
"outputs": [],
2566+
"source": [
2567+
"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",
2568+
"all_letters5 = \n",
2569+
"['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",
2570+
"move_positions5 = [0,1,12,15,20,21,22,23]\n",
2571+
"fixed_positions5 = [2,3, 4,5,6,7, 8,9,10,11, 13,14, 16,17,18,19] \n",
2572+
"top_permutation5, letter_permutations5, scores5 = permute_and_optimize(keys24, SpeedStrengthFlow24x24, bigrams, all_letters5, move_positions5, fixed_positions5, ntop=10, verbose=False)"
2573+
]
2574+
},
25412575
{
25422576
"cell_type": "markdown",
25432577
"metadata": {},
@@ -2677,16 +2711,6 @@
26772711
" OY 1020190223 o x"
26782712
]
26792713
},
2680-
{
2681-
"cell_type": "markdown",
2682-
"metadata": {
2683-
"colab_type": "raw",
2684-
"id": "lSk8xYCfDzS6"
2685-
},
2686-
"source": [
2687-
" \n"
2688-
]
2689-
},
26902714
{
26912715
"cell_type": "markdown",
26922716
"metadata": {
@@ -2776,19 +2800,19 @@
27762800
"\n",
27772801
" # 1 2 3 4 5 6 7 8 9 0 < >\n",
27782802
"\n",
2779-
" K U O Y ' \" W L G B Q\n",
2780-
" H I E A , . T S R N J \n",
2781-
" V Z X C ( ) D M F P \n",
2782-
" \n",
2803+
" Y P O U ' \" G D L B Q\n",
2804+
" H I E A , . R T S N J \n",
2805+
" V Z X C ( ) M K W F\n",
2806+
"\n",
27832807
"Shift to access similar-looking characters above the numbers, and swap the Backspace and Caps lock keys:\n",
27842808
"\n",
27852809
"\n",
27862810
" ~ ! = ? + $ @ ^ & % * < >\n",
27872811
" # 1 2 3 4 5 6 7 8 9 0 [ ] Caps\n",
27882812
"\n",
2789-
" Tab K U O Y ' \" W L G B Q - /\n",
2790-
" Back H I E A , . T S R N J Enter\n",
2791-
" Shift V Z X C ( ) D M F P Shift\n",
2813+
" Tab Y P O U ' \" G D L B Q - /\n",
2814+
" Back H I E A , . R T S N J Enter\n",
2815+
" Shift V Z X C ( ) M K W F Shift\n",
27922816
"\n",
27932817
" Ctrl Fn Cmd Alt Space Alt Ctrl Arrows\n",
27942818
"\n",

0 commit comments

Comments
 (0)