Commits

Anonymous committed 2990575

some manual fixes. Has a sagfault on evolution.

Comments (0)

Files changed (3)

 abc_full = u"abcdefghijklmnopqrstuvwxyzäöüß,."
 
 #: The modifiers, sorted by layer, split into left and right, counting from 0.
-MODIFIERS_PER_LAYER = [("", ""), ("⇧", "⇗"), ("⇩", "⇘"), ("⇚", "⇙"), ("⇩⇧", "⇘⇗"), ("⇩⇚", "⇘⇙")]
+MODIFIERS_PER_LAYER = [(u"", u""), (u"⇧", u"⇗"), (u"⇩", u"⇘"), (u"⇚", u"⇙"), (u"⇩⇧", u"⇘⇗"), (u"⇩⇚", u"⇘⇙")]
 
 #: The positions which are by default accessed by the given finger. 
 FINGER_POSITIONS = {
-    "Klein_L": [(1, 1, 0), (2, 0, 0), (2, 1, 0), (3, 0, 0), (3, 1, 0), (3, 2, 0)], # Klein_L
-    "Ring_L": [(1, 2, 0), (2, 2, 0), (3, 3, 0)], # Ring_L
-    "Mittel_L": [(1, 3, 0), (2, 3, 0), (3, 4, 0)], # Mittel_L
-    "Zeige_L": [(1, 4, 0), (2, 4, 0), (3, 5, 0), (1, 5, 0), (2, 5, 0), (3, 6, 0)], # Zeige_L
-    "Daumen_L": [(4, 3, 0)], # Daumen_L
-    "Daumen_R": [(4, 3, 0), (4, 4, 0)], # Daumen_R
-    "Zeige_R": [(1, 6, 0), (2, 6, 0), (3, 7, 0), (1, 7, 0), (2, 7, 0), (3, 8, 0)], # Zeige_R
-    "Mittel_R": [(1, 8, 0), (2, 8, 0), (3, 9, 0)], # Mittel_R
-    "Ring_R": [(1, 9, 0), (2, 9, 0), (3, 10, 0)], # Ring_R
-    "Klein_R": [(1, 10, 0), (2, 10, 0), (3, 11, 0), (1, 11, 0), (2, 11, 0), (1, 12, 0), (2, 12, 0), (2, 13, 0), (3, 12, 0)] # Klein_R
+    u"Klein_L": [(1, 1, 0), (2, 0, 0), (2, 1, 0), (3, 0, 0), (3, 1, 0), (3, 2, 0)], # Klein_L
+    u"Ring_L": [(1, 2, 0), (2, 2, 0), (3, 3, 0)], # Ring_L
+    u"Mittel_L": [(1, 3, 0), (2, 3, 0), (3, 4, 0)], # Mittel_L
+    u"Zeige_L": [(1, 4, 0), (2, 4, 0), (3, 5, 0), (1, 5, 0), (2, 5, 0), (3, 6, 0)], # Zeige_L
+    u"Daumen_L": [(4, 3, 0)], # Daumen_L
+    u"Daumen_R": [(4, 3, 0), (4, 4, 0)], # Daumen_R
+    u"Zeige_R": [(1, 6, 0), (2, 6, 0), (3, 7, 0), (1, 7, 0), (2, 7, 0), (3, 8, 0)], # Zeige_R
+    u"Mittel_R": [(1, 8, 0), (2, 8, 0), (3, 9, 0)], # Mittel_R
+    u"Ring_R": [(1, 9, 0), (2, 9, 0), (3, 10, 0)], # Ring_R
+    u"Klein_R": [(1, 10, 0), (2, 10, 0), (3, 11, 0), (1, 11, 0), (2, 11, 0), (1, 12, 0), (2, 12, 0), (2, 13, 0), (3, 12, 0)] # Klein_R
 }
 
 #: The lowest index for the right hand per line in the config (pos[0] is the line, pos[1] the index). TODO: Generate automatically from the finger positions.
 COST_MANUAL_BIGRAM_PENALTY = {
     ((1, 2, 0), (3, 2, 0)): 1, # vü on normal keyboards (lower row shifted to the right)
     ((3, 2, 0), (1, 2, 0)): 1 # üv on normal keyboards (lower row shifted to the right)
-MODIFIERS_PER_LAYER = [(u"", u""), (u"⇧", u"⇗"), (u"⇩", u"⇘"), (u"⇚", u"⇙"), (u"⇩⇧", u"⇘⇗"), (u"⇩⇚", u"⇘⇙")]
     }
 # all pinky repeats
 for finger in ("Klein_L", "Klein_R"): 
     l = u""
     l += u"".join((i[0] for i in layout[1][1:6])) + u" " + u"".join((i[0] for i in layout[1][6:-1])) + u"\n"
     l += u"".join((i[0] for i in layout[2][1:6])) + u" " + u"".join((i[0] for i in layout[2][6:-2])) + u"\n"
-    if layout[3][1] and layout[3][1][0] != "⇚": 
+    if layout[3][1] and layout[3][1][0] != u"⇚": 
         l += u"".join((i[0] for i in layout[3][1:7])) + u" " + u"".join((i[0] for i in layout[3][7:-1]))
     else:
         l += u"".join((i[0] for i in layout[3][2:7])) + u" " + u"".join((i[0] for i in layout[3][7:-1]))
     return neighboring_unbalance
 
 def line_changes(repeats, layout=NEO_LAYOUT, warped_keyboard=True):
-
+    u"""
     TODO: Don’t care about the hand (left index low and right high is still not nice).
 
     >>> data = read_file("testfile")