summaryrefslogtreecommitdiffstats
path: root/todo.py
diff options
context:
space:
mode:
authorjakub <jakub>1999-09-30 18:51:45 +0000
committerjakub <jakub>1999-09-30 18:51:45 +0000
commit958f048f5e3e54be6f28b5e84607b6eb361356e9 (patch)
tree2277913bcc00c54947eefa2f23c99f90627fc916 /todo.py
parent038c281383c23442e40cbe877a45be9805031574 (diff)
downloadanaconda-958f048f5e3e54be6f28b5e84607b6eb361356e9.tar.gz
anaconda-958f048f5e3e54be6f28b5e84607b6eb361356e9.tar.xz
anaconda-958f048f5e3e54be6f28b5e84607b6eb361356e9.zip
Keyboard autodetection, separated Keyboard stuff into separate module.
Diffstat (limited to 'todo.py')
-rw-r--r--todo.py172
1 files changed, 2 insertions, 170 deletions
diff --git a/todo.py b/todo.py
index 6eb0e0f8e..aa8eec1a1 100644
--- a/todo.py
+++ b/todo.py
@@ -9,6 +9,8 @@ import crypt
import whrandom
import pcmcia
import _balkan
+import kudzu
+from kbd import Keyboard
from simpleconfig import SimpleConfigFile
from mouse import Mouse
from xf86config import XF86Config
@@ -207,176 +209,6 @@ class Language (SimpleConfigFile):
def get (self):
return self.lang
-class Keyboard (SimpleConfigFile):
- console2x = {
- "be-latin1" : ('pc102', 'be'),
- "be2-latin1" : ('pc102', 'be'),
- "fr-latin0" : ('pc102', 'fr'),
- "fr-latin1" : ('pc102', 'fr'),
- "fr-pc" : ('pc102', 'fr'),
- "fr" : ('pc102', 'fr'),
- "bg" : ('pc102', 'bg'),
- "cf" : ('pc102', 'cf'),
- "cz-lat2-prog" : ('pc102', 'cs'),
- "cz-lat2" : ('pc102', 'cs'),
- "dk-latin1" : ('pc102', 'dk'),
- "dk" : ('pc102', 'dk'),
- "es" : ('pc102', 'es'),
- "fi-latin1" : ('pc102', 'fi'),
- "fi" : ('pc102', 'fi'),
- "hu101" : ('pc102', 'hu'),
- "it-ibm" : ('pc101', 'it'),
- "it" : ('pc102', 'it'),
- "it2" : ('pc102', 'it'),
- "jp106" : ('jp106', 'jp'),
- "no-latin1" : ('pc102', 'no'),
- "no" : ('pc102', 'no'),
- "pl" : ('pc102', 'pl'),
- "pt-latin1" : ('pc102', 'pt'),
- "ru-cp1251" : ('pc102', 'ru'),
- "ru-ms" : ('microsoft', 'ru'),
- "ru" : ('pc102', 'ru'),
- "ru1" : ('pc102', 'ru'),
- "ru2" : ('pc102', 'ru'),
- "ru_win" : ('pc105', 'ru'),
- "se-latin1" : ('pc102', 'se'),
- "us" : ('pc101', 'us'),
- "de-latin1-nodeadkeys" : ('pc102', 'de'),
- "de-latin1" : ('pc102', 'de'),
- "de" : ('pc102', 'de'),
- "fr_CH-latin1" : ('pc102', 'fr_CH'),
- "fr_CH" : ('pc102', 'fr_CH'),
- "hu" : ('pc102', 'fr_CH'),
- }
- # XXX fixme - externalize
- def __init__ (self):
- self.type = "PC"
- self.info = {}
- try:
- f = open ("/dev/kbd", "r")
- f.close()
- self.type = "Sun"
- except:
- pass
-
- def available (self):
- if self.type == "Sun":
- return [
- "sun-pl-altgraph",
- "sun-pl",
- "sundvorak",
- "sunkeymap",
- "sunt4-es",
- "sunt4-no-latin1.map.gz",
- "sunt5-cz-us",
- "sunt5-de-latin1",
- "sunt5-es",
- "sunt5-fi-latin1",
- "sunt5-fr-latin1",
- "sunt5-ru",
- "sunt5-uk",
- "sunt5-us-cz",
- ]
- return [
- "azerty",
- "be-latin1",
- "be2-latin1",
- "fr-latin0",
- "fr-latin1",
- "fr-pc",
- "fr",
- "wangbe",
- "ANSI-dvorak",
- "dvorak-l",
- "dvorak-r",
- "dvorak",
- "pc-dvorak-latin1",
- "tr_f-latin5",
- "trf",
- "bg",
- "cf",
- "cz-lat2-prog",
- "cz-lat2",
- "defkeymap",
- "defkeymap_V1.0",
- "dk-latin1",
- "dk",
- "emacs",
- "emacs2",
- "es",
- "fi-latin1",
- "fi",
- "gr-pc",
- "gr",
- "hebrew",
- "hu101",
- "is-latin1",
- "it-ibm",
- "it",
- "it2",
- "jp106",
- "la-latin1",
- "lt",
- "lt.l4",
- "nl",
- "no-latin1",
- "no",
- "pc110",
- "pl",
- "pt-latin1",
- "pt-old",
- "ro",
- "ru-cp1251",
- "ru-ms",
- "ru-yawerty",
- "ru",
- "ru1",
- "ru2",
- "ru_win",
- "se-latin1",
- "sk-prog-qwerty",
- "sk-prog",
- "sk-qwerty",
- "tr_q-latin5",
- "tralt",
- "trf",
- "trq",
- "ua",
- "uk",
- "us",
- "croat",
- "cz-us-qwertz",
- "de-latin1-nodeadkeys",
- "de-latin1",
- "de",
- "fr_CH-latin1",
- "fr_CH",
- "hu",
- "sg-latin1-lk450",
- "sg-latin1",
- "sg",
- "sk-prog-qwertz",
- "sk-qwertz",
- "slovene",
- ]
-
- def set (self, keytable):
- self.info["KEYTABLE"] = keytable
-
- def get (self):
- if self.info.has_key ("KEYTABLE"):
- return self.info["KEYTABLE"]
- else:
- if self.type == "Sun":
- return "sunkeymap"
- else:
- return "us"
-
- def getXKB (self):
- if Keyboard.console2x.has_key (self.get ()):
- (model, keylayout) = Keyboard.console2x[self.get ()]
- return ("xfree86", model, keylayout, "", "")
-
class Authentication:
def __init__ (self):
self.useShadow = 1