Menu

#5 support for swiss-german keyboards

closed-accepted
Enhancement (7)
5
2001-07-16
2001-07-16
No

This patch may be usefull only to me :-)
Anyway, here are the patches to the two files: Preference.py and Views/StyledTextCtrls.py

Also: why do you use chr(64) instead of '@' in the code?

tch@linux:~/boa$ cvs diff -u Preferences.py
Index: Preferences.py
===================================================================
RCS file: /cvsroot/boa-constructor/boa/Preferences.py,v
retrieving revision 1.19
diff -u -r1.19 Preferences.py
--- Preferences.py 2001/07/15 16:20:42 1.19
+++ Preferences.py 2001/07/16 08:46:31
@@ -97,7 +97,7 @@
# Flag for turning on special checking for european keyboard characters by
# checking for certain codes while ctrl alt is held.
handleSpecialEuropeanKeys = 0
-# Country code for keyboards, options: 'euro', 'france'
+# Country code for keyboards, options: 'euro', 'france', 'swiss-german'
euroKeysCountry = 'euro'

# Auto correct indentation and EOL characters on load, save and refresh

tch@linux:~/boa$ cvs diff -u Views/StyledTextCtrls.py
Index: Views/StyledTextCtrls.py
===================================================================
RCS file: /cvsroot/boa-constructor/boa/Views/StyledTextCtrls.py,v
retrieving revision 1.13
diff -u -r1.13 StyledTextCtrls.py
--- Views/StyledTextCtrls.py 2001/07/15 16:16:18 1.13
+++ Views/StyledTextCtrls.py 2001/07/16 08:46:43
@@ -577,6 +577,8 @@
'france': {48: chr(64), 53: chr(91), 219: chr(93), 52: chr(123),
337: chr(125), 56: chr(92), 50: chr(126), 226: chr(54),
55: chr(96), 51: chr(35), 54: chr(124)},
+ 'swiss-german': {50:'@', 51:'#', 55:'|', 221:'~', 219:'´', 186:'[',
+ 192:']', 220:'{', 223:'}', 226:'\\'},
}
def handleSpecialEuropeanKeys(self, event, countryKeymap='euro'):
key = event.KeyCode()

Discussion

  • Riaan Booysen

    Riaan Booysen - 2001-07-16
    • assigned_to: nobody --> riaan
    • status: open --> closed-accepted
     
  • Riaan Booysen

    Riaan Booysen - 2001-07-16

    Logged In: YES
    user_id=438

    Cool, it's been checked into CVS, thanks!

    I did not decide on char()s. Like yourself, all other key mapping were submitted by different people.
    I've now replaced all the char()'s with strings (simple eval and print :) because I agree it's better, but sure looks like
    line noise ;)

     

Log in to post a comment.