MCPcopy Create free account
hub / github.com/EasyIME/PIME / charCodeToFullshape

Method charCodeToFullshape

python/cinbase/__init__.py:2733–2746  ·  view source on GitHub ↗
(self, cbTS, charCode, keyCode)

Source from the content-addressed store, hash-verified

2731
2732 # 一般字元轉全形
2733 def charCodeToFullshape(self, cbTS, charCode, keyCode):
2734 if cbTS.langMode == CHINESE_MODE and cbTS.outputSmallLetterWithShift and self.isLetterChar(keyCode):
2735 char = chr(charCode).upper() if cbTS.capsStates else chr(charCode).lower()
2736 charCode = ord(char)
2737
2738 charStr = ''
2739 if charCode < 0x0020 or charCode > 0x7e:
2740 charStr = chr(charCode)
2741 if charCode == 0x0020: # Spacebar
2742 charStr = chr(0x3000)
2743 else:
2744 charCode += 0xfee0
2745 charStr = chr(charCode)
2746 return charStr
2747
2748 # 符號字元轉全形
2749 def SymbolscharCodeToFullshape(self, charCode):

Callers 1

onKeyDownMethod · 0.95

Calls 2

isLetterCharMethod · 0.95
upperMethod · 0.80

Tested by

no test coverage detected