From 1f792853f25999448da656fb8724df6aba4ba03d Mon Sep 17 00:00:00 2001 From: RealOrge <45096491+RealOrge@users.noreply.github.com> Date: Thu, 13 Dec 2018 16:39:04 +0200 Subject: [PATCH] Update switch_lang.py --- thefuck/rules/switch_lang.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/thefuck/rules/switch_lang.py b/thefuck/rules/switch_lang.py index d3a4aafc..61d932aa 100644 --- a/thefuck/rules/switch_lang.py +++ b/thefuck/rules/switch_lang.py @@ -36,14 +36,16 @@ def _switch(ch, layout): def _switch_command(command, layout): if (source_layouts.index(layout) == 3): # this is for the Greek keyboard - keyboardDic = {';': "q", 'ς': "w", 'ε': "e", 'ρ': "r", 'τ': "t", 'υ': "y", 'θ': "u", 'ι': "i", 'ο': "o", 'π': "p", - '[': "[", ']': "]", 'α': "a", 'σ': "s", 'δ': "d", 'φ': "f", 'γ': "g", 'η': "h", 'ξ': "j", 'κ': "k", - 'λ': "l", '΄': "'", 'ζ': "z", 'χ': "x", 'ψ': "c", 'ω': "v", 'β': "b", 'ν': "n", 'μ': "m", ',': ",", - '.': ".", '/': "/", ':': "Q", '΅': "W", 'Ε': "E", 'Ρ': "R", 'Τ': "T", 'Υ': "Y", 'Θ': "U", 'Ι': "I", - 'Ο': "O", 'Π': "P", '{': "{", '}': "}", 'Α': "A", 'Σ': "S", 'Δ': "D", 'Φ': "F", 'Γ': "G", 'Η': "H", - 'Ξ': "J", 'Κ': "K", 'Λ': "L", '¨': ":", '"': '"', 'Ζ': "Z", 'Χ': "X", 'Ψ': "C", 'Ω': "V", 'Β': "B", - 'Ν': "N", 'Μ': "M", '<': "<", '>': ">", '?': "?", 'ά': "a", 'έ': "e", 'ύ': "y", 'ί': "i", 'ό': "o", - 'ή': 'h', 'ώ': "v", 'Ά': "A", 'Έ': "E", 'Ύ': "Y", 'Ί': "I", 'Ό': "O", 'Ή': "H", 'Ώ': "V"} + keyboardDic = {u';': "q", u'ς': "w", u'ε': "e", u'ρ': "r", u'τ': "t", u'υ': "y", u'θ': "u", u'ι': "i", u'ο': "o", + u'π': "p", u'[': "[", u']': "]", u'α': "a", u'σ': "s", u'δ': "d", u'φ': "f", u'γ': "g", u'η': "h", + u'ξ': "j", u'κ': "k", u'λ': "l", u'΄': "'", u'ζ': "z", u'χ': "x", u'ψ': "c", u'ω': "v", u'β': "b", + u'ν': "n", u'μ': "m", u',': ",", u'.': ".", u'/': "/", u':': "Q", u'΅': "W", u'Ε': "E", u'Ρ': "R", + u'Τ': "T", u'Υ': "Y", u'Θ': "U", u'Ι': "I", u'Ο': "O", u'Π': "P", u'{': "{", u'}': "}", u'Α': "A", + u'Σ': "S", u'Δ': "D", u'Φ': "F", u'Γ': "G", u'Η': "H", u'Ξ': "J", u'Κ': "K", u'Λ': "L", u'¨': ":", + u'"': '"', u'Ζ': "Z", u'Χ': "X", u'Ψ': "C", u'Ω': "V", u'Β': "B", u'Ν': "N", u'Μ': "M", u'<': "<", + u'>': ">", u'?': "?", u'ά': "a", u'έ': "e", u'ύ': "y", u'ί': "i", u'ό': "o", u'ή': 'h', u'ώ': u"v", + u'Ά': "A", u'Έ': "E", u'Ύ': "Y", u'Ί': "I", u'Ό': "O", u'Ή': "H", u'Ώ': "V"} + newCommand = "" for ch in command.script: try: