示例#1
0
    def __init__(self, client):
        TextService.__init__(self, client)

        # 輸入法模組自訂區域
        self.imeDirName = "chepinyin"
        self.maxCharLength = 7 # 輸入法最大編碼字元數量
        self.cinFileList = ["thpinyin.cin", "pinyin.cin", "roman.cin"]

        self.cinbase = CinBase
        self.curdir = os.path.abspath(os.path.dirname(__file__))
        self.datadir = os.path.join(self.curdir, "data")
        self.cindir = os.path.join(self.curdir, "cin")
        self.icon_dir = self.curdir

        # 初始化輸入行為設定
        self.cinbase.initTextService(self)

        # 載入用戶設定值
        CinBaseConfig.__init__()
        self.configVersion = CinBaseConfig.getVersion()
        self.cfg = copy.deepcopy(CinBaseConfig)
        self.cfg.imeDirName = self.imeDirName
        self.cfg.cinFileList = self.cinFileList
        self.cfg.cindir = self.cindir
        self.cfg.load()

        # 載入輸入法碼表
        if not CinTable.cin:
            CinTable.loadCinFile(self)
            self.cin = CinTable.cin
        else:
            self.cin = CinTable.cin
示例#2
0
    def __init__(self, client):
        TextService.__init__(self, client)

        # 輸入法模組自訂區域
        self.imeDirName = "cheliu"
        self.maxCharLength = 5  # 輸入法最大編碼字元數量
        self.cinFileList = ["liu.json"]

        self.cinbase = CinBase
        self.curdir = os.path.abspath(os.path.dirname(__file__))

        # 初始化輸入行為設定
        self.cinbase.initTextService(self, TextService)

        # 載入用戶設定值
        CinBaseConfig.__init__()
        self.configVersion = CinBaseConfig.getVersion()
        self.cfg = copy.deepcopy(CinBaseConfig)
        self.cfg.imeDirName = self.imeDirName
        self.cfg.cinFileList = self.cinFileList
        self.cfg.load()
        self.jsondir = self.cfg.getJsonDir()
        self.cindir = self.cfg.getCinDir()
        self.ignorePrivateUseArea = self.cfg.ignorePrivateUseArea
        self.cinbase.initCinBaseContext(self)

        # 載入輸入法碼表
        if not CinTable.curCinType == self.cfg.selCinType and not CinTable.loading:
            loadCinFile = LoadCinTable(self, CinTable)
            loadCinFile.start()
        else:
            while CinTable.loading:
                continue
            self.cin = CinTable.cin
示例#3
0
    def __init__(self, client):
        TextService.__init__(self, client)

        # 輸入法模組自訂區域
        self.imeDirName = "cheliu"
        self.maxCharLength = 4 # 輸入法最大編碼字元數量
        self.cinFileList = ["liu.json"]

        self.cinbase = CinBase
        self.curdir = os.path.abspath(os.path.dirname(__file__))

        # 初始化輸入行為設定
        self.cinbase.initTextService(self, TextService)

        # 載入用戶設定值
        CinBaseConfig.__init__()
        self.configVersion = CinBaseConfig.getVersion()
        self.cfg = copy.deepcopy(CinBaseConfig)
        self.cfg.imeDirName = self.imeDirName
        self.cfg.cinFileList = self.cinFileList
        self.cfg.load()
        self.jsondir = self.cfg.getJsonDir()
        self.cindir = self.cfg.getCinDir()
        self.ignorePrivateUseArea = self.cfg.ignorePrivateUseArea
        self.cinbase.initCinBaseContext(self)

        # 載入輸入法碼表
        if not CinTable.curCinType == self.cfg.selCinType and not CinTable.loading:
            loadCinFile = LoadCinTable(self, CinTable)
            loadCinFile.start()
        else:
            while CinTable.loading:
                continue
            self.cin = CinTable.cin
示例#4
0
    def __init__(self, client):
        TextService.__init__(self, client)

        # 輸入法模組自訂區域
        self.imeDirName = "checj"
        self.maxCharLength = 5  # 輸入法最大編碼字元數量
        self.cinFileList = [
            "checj.cin", "mscj3.cin", "cj-ext.cin", "cnscj.cin", "thcj.cin",
            "newcj3.cin", "cj5.cin", "newcj.cin", "scj6.cin"
        ]

        self.cinbase = CinBase
        self.curdir = os.path.abspath(os.path.dirname(__file__))
        self.datadir = os.path.join(self.curdir, "data")
        self.cindir = os.path.join(self.curdir, "cin")
        self.icon_dir = self.curdir

        # 初始化輸入行為設定
        self.cinbase.initTextService(self, TextService)

        # 載入用戶設定值
        CinBaseConfig.__init__()
        self.configVersion = CinBaseConfig.getVersion()
        self.cfg = copy.deepcopy(CinBaseConfig)
        self.cfg.imeDirName = self.imeDirName
        self.cfg.cinFileList = self.cinFileList
        self.cfg.cindir = self.cindir
        self.cfg.load()

        # 載入輸入法碼表
        if not CinTable.cin:
            CinTable.loadCinFile(self)
            self.cin = CinTable.cin
        else:
            self.cin = CinTable.cin
示例#5
0
    def __init__(self, client):
        TextService.__init__(self, client)

        # 輸入法模組自訂區域
        self.imeDirName = "chedayi"
        self.maxCharLength = 4  # 輸入法最大編碼字元數量
        self.cinFileList = ["thdayi.cin", "dayi4.cin", "dayi3.cin"]

        self.cinbase = CinBase
        self.curdir = os.path.abspath(os.path.dirname(__file__))
        self.datadir = os.path.join(self.curdir, "data")
        self.cindir = os.path.join(self.curdir, "cin")
        self.icon_dir = self.curdir

        # 初始化輸入行為設定
        self.cinbase.initTextService(self, TextService)
        self.useDayiSymbols = True
        self.selDayiSymbolCharType = 0

        # 載入用戶設定值
        CinBaseConfig.__init__()
        self.configVersion = CinBaseConfig.getVersion()
        self.cfg = copy.deepcopy(CinBaseConfig)
        self.cfg.imeDirName = self.imeDirName
        self.cfg.cinFileList = self.cinFileList
        self.cfg.cindir = self.cindir
        self.cfg.load()

        # 載入輸入法碼表
        if not CinTable.cin:
            CinTable.loadCinFile(self)
            self.cin = CinTable.cin
        else:
            self.cin = CinTable.cin
示例#6
0
    def __init__(self, client):
        TextService.__init__(self, client)

        # 輸入法模組自訂區域
        self.imeDirName = "chesimplex"
        self.maxCharLength = 2  # 輸入法最大編碼字元數量
        self.cinFileList = ["simplecj.cin", "simplex.cin", "simplex5.cin"]

        self.cinbase = CinBase
        self.curdir = os.path.abspath(os.path.dirname(__file__))
        self.datadir = os.path.join(self.curdir, "data")
        self.cindir = os.path.join(self.curdir, "cin")
        self.icon_dir = self.curdir

        # 初始化輸入行為設定
        self.cinbase.initTextService(self, TextService)

        # 載入用戶設定值
        CinBaseConfig.__init__()
        self.configVersion = CinBaseConfig.getVersion()
        self.cfg = copy.deepcopy(CinBaseConfig)
        self.cfg.imeDirName = self.imeDirName
        self.cfg.cinFileList = self.cinFileList
        self.cfg.cindir = self.cindir
        self.cfg.load()

        # 載入輸入法碼表
        if not CinTable.curCinType == self.cfg.selCinType and not CinTable.loading:
            loadCinFile = LoadCinTable(self, CinTable)
            loadCinFile.start()
        else:
            while CinTable.loading:
                continue
            self.cin = CinTable.cin
示例#7
0
    def __init__(self, client):
        TextService.__init__(self, client)

        # 輸入法模組自訂區域
        self.imeDirName = "chephonetic"
        self.maxCharLength = 4 # 輸入法最大編碼字元數量
        self.cinFileList = ["thphonetic.json", "CnsPhonetic.json", "bpmf.json"]

        self.cinbase = CinBase
        self.curdir = os.path.abspath(os.path.dirname(__file__))

        # 初始化輸入行為設定
        self.cinbase.initTextService(self, TextService)

        # 載入用戶設定值
        CinBaseConfig.__init__()
        self.configVersion = CinBaseConfig.getVersion()
        self.cfg = copy.deepcopy(CinBaseConfig)
        self.cfg.imeDirName = self.imeDirName
        self.cfg.cinFileList = self.cinFileList
        self.cfg.load()
        self.jsondir = self.cfg.getJsonDir()
        self.cindir = self.cfg.getCinDir()
        self.ignorePrivateUseArea = self.cfg.ignorePrivateUseArea
        self.cinbase.initCinBaseContext(self)

        self.keyboardLayout = self.cfg.keyboardLayout
        self.kbtypelist = [
            "1qaz2wsxedcrfv5tgbyhnujm8ik,9ol.0p;/-7634",        # standard kb
            "bpmfdtnlvkhg7c,./j;'sexuaorwiqzy890-=1234",        # ET
            "1234567890-qwertyuiopasdfghjkl;zxcvbn/m,.",        # IBM
            "2wsx3edcrfvtgb6yhnujm8ik,9ol.0p;/-['=1qaz"         # Gin-yieh
        ]

        self.zhuintab = [
            "1qaz2wsxedcrfv5tgbyhn",    # ㄅㄆㄇㄈㄉㄊㄋㄌㄍㄎㄏㄐㄑㄒㄓㄔㄕㄖㄗㄘㄙ
            "ujm",                      # ㄧㄨㄩ
            "8ik,9ol.0p;/-",            # ㄚㄛㄜㄝㄞㄟㄠㄡㄢㄣㄤㄥㄦ
            "7634"                      # ˙ˊˇˋ
        ]

        # 載入輸入法碼表
        if not CinTable.curCinType == self.cfg.selCinType and not CinTable.loading:
            loadCinFile = LoadCinTable(self, CinTable)
            loadCinFile.start()
        else:
            while CinTable.loading:
                continue
            self.cin = CinTable.cin

        self.useEndKey = True
        self.autoShowCandWhenMaxChar = True

        self.endKeyList = []
        self.endKey = self.kbtypelist[self.keyboardLayout][-4:]

        for key in self.endKey:
            self.endKeyList.append(key)
示例#8
0
    def __init__(self, client):
        TextService.__init__(self, client)

        # 輸入法模組自訂區域
        self.imeDirName = "chephonetic"
        self.maxCharLength = 4  # 輸入法最大編碼字元數量
        self.cinFileList = ["thphonetic.json", "CnsPhonetic.json", "bpmf.json"]

        self.cinbase = CinBase
        self.curdir = os.path.abspath(os.path.dirname(__file__))

        # 初始化輸入行為設定
        self.cinbase.initTextService(self, TextService)

        # 載入用戶設定值
        CinBaseConfig.__init__()
        self.configVersion = CinBaseConfig.getVersion()
        self.cfg = copy.deepcopy(CinBaseConfig)
        self.cfg.imeDirName = self.imeDirName
        self.cfg.cinFileList = self.cinFileList
        self.cfg.load()
        self.jsondir = self.cfg.getJsonDir()
        self.cindir = self.cfg.getCinDir()
        self.ignorePrivateUseArea = self.cfg.ignorePrivateUseArea
        self.cinbase.initCinBaseContext(self)

        self.keyboardLayout = self.cfg.keyboardLayout
        self.kbtypelist = [
            "1qaz2wsxedcrfv5tgbyhnujm8ik,9ol.0p;/-7634",  # standard kb
            "bpmfdtnlvkhg7c,./j;'sexuaorwiqzy890-=1234",  # ET
            "1234567890-qwertyuiopasdfghjkl;zxcvbn/m,.",  # IBM
            "2wsx3edcrfvtgb6yhnujm8ik,9ol.0p;/-['=1qaz"  # Gin-yieh
        ]

        self.zhuintab = [
            "1qaz2wsxedcrfv5tgbyhn",  # ㄅㄆㄇㄈㄉㄊㄋㄌㄍㄎㄏㄐㄑㄒㄓㄔㄕㄖㄗㄘㄙ
            "ujm",  # ㄧㄨㄩ
            "8ik,9ol.0p;/-",  # ㄚㄛㄜㄝㄞㄟㄠㄡㄢㄣㄤㄥㄦ
            "7634"  # ˙ˊˇˋ
        ]

        # 載入輸入法碼表
        if not CinTable.curCinType == self.cfg.selCinType and not CinTable.loading:
            loadCinFile = LoadCinTable(self, CinTable)
            loadCinFile.start()
        else:
            while CinTable.loading:
                continue
            self.cin = CinTable.cin

        self.useEndKey = True
        self.autoShowCandWhenMaxChar = True

        self.endKeyList = []
        self.endKey = self.kbtypelist[self.keyboardLayout][-4:]

        for key in self.endKey:
            self.endKeyList.append(key)
示例#9
0
    def __init__(self, client):
        TextService.__init__(self, client)

        # 輸入法模組自訂區域
        self.imeDirName = "checj"
        self.maxCharLength = 5  # 輸入法最大編碼字元數量
        self.cinFileList = [
            "checj.cin", "mscj3.cin", "mscj3-ext.cin", "cj-ext.cin",
            "cnscj.cin", "thcj.cin", "newcj3.cin", "cj5.cin", "newcj.cin",
            "scj6.cin"
        ]

        self.cinbase = CinBase
        self.curdir = os.path.abspath(os.path.dirname(__file__))

        # 初始化輸入行為設定
        self.cinbase.initTextService(self, TextService)

        # 載入用戶設定值
        CinBaseConfig.__init__()
        self.configVersion = CinBaseConfig.getVersion()
        self.cfg = copy.deepcopy(CinBaseConfig)
        self.cfg.imeDirName = self.imeDirName
        self.cfg.cinFileList = self.cinFileList
        self.cfg.load()

        # 載入輸入法碼表
        self.cindir = self.cfg.getCinDir()
        if not CinTable.curCinType == self.cfg.selCinType and not CinTable.loading:
            loadCinFile = LoadCinTable(self, CinTable)
            loadCinFile.start()
        else:
            while CinTable.loading:
                continue
            self.cin = CinTable.cin

        # 反查輸入法字根
        if self.cfg.imeReverseLookup:
            self.imeReverseLookup = self.cfg.imeReverseLookup
            self.rcinFileList = self.cfg.rcinFileList
            self.selRCinType = self.cfg.selRCinType
            if not self.rcinFileList:
                self.cinbase.updateRcinFileList(self)

            if not RCinTable.curCinType == self.cfg.selRCinType and not RCinTable.loading:
                loadRCinFile = LoadRCinTable(self, RCinTable)
                loadRCinFile.start()
            else:
                while RCinTable.loading:
                    continue
                self.rcin = RCinTable.cin