diff options
-rw-r--r-- | xkb.py | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -1,6 +1,7 @@ import _xkb import tree import string +import os class XKB: def __init__ (self): @@ -31,8 +32,27 @@ class XKB: if variant == None: variant = "" if options == None: options = "" + args = () + + if (model): + args = args + ("-model", model) + if (layout): + args = args + ("-layout", layout) + if (variant): + args = args + ("-variant", variant) + + path = ("/usr/X11R6/bin/setxkbmap",) + if (os.fork () == 0): + os.execv (path[0], path + args) + + return + + # don't use any of our code, since it seems to corrupt + # lots of memory return _xkb.set_rule (model, layout, variant, options) + + def getRulesBase (self): return _xkb.get_rulesbase () |