Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cs_pinyin] CS-Pinyin keyboard initial public version #64

Merged
merged 22 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
03c38ac
CS-Pinyin initial version
mcdurdin Jul 27, 2017
53f0557
Create build folder if missing in build script
mcdurdin Jul 27, 2017
143ed2e
rename .cfx file
MakaraSok Aug 25, 2017
2cc8cfa
Merge branch 'master' into cs-pinyin
MakaraSok Sep 28, 2017
a5821e6
move cs-pinyin to the new layout
MakaraSok Sep 28, 2017
a90775d
Merge branch 'master' into cs-pinyin
MakaraSok Oct 2, 2017
0d872de
Merge branch 'master' into cs-pinyin
MakaraSok Oct 5, 2017
b92839b
Merge branch 'master' into cs-pinyin
MakaraSok Oct 26, 2017
9a69d97
Merge branch 'cs-pinyin' of https://github.com/mcdurdin/keyboards int…
MakaraSok Oct 26, 2017
19e43d0
fix compile errors and update some metadata
MakaraSok Oct 26, 2017
258b32b
fix(windows): checks all KM_IMX class windows
rc-swag Apr 26, 2024
5c98a65
chore: add build.bat script and reorganize for Keyman 17
mcdurdin Jul 4, 2024
290864c
Merge branch 'master' into cs-pinyin
mcdurdin Jul 4, 2024
3212b7e
chore: restore validate.inc.sh
mcdurdin Jul 4, 2024
73b694b
chore(cs_pinyin): cleanup README and remove old files
mcdurdin Jul 4, 2024
f77f6d0
chore(cs_pinyin): make global variables thread_local
mcdurdin Jul 5, 2024
854ac90
Merge branch 'master' into cs-pinyin
LornaSIL Jul 5, 2024
50d343b
fix(windows): fix mulitple monitor support
rc-swag Jul 15, 2024
8a3562e
fix(windows): registry settings defined in header shared
rc-swag Jul 26, 2024
ee2ab11
chore: Update copyright and file names and locations
rc-swag Jul 31, 2024
8a9bf74
fix: remove style block per review comment
rc-swag Jul 31, 2024
11e1c07
chore: add related legacey cs-pinyin
rc-swag Jul 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions release/c/cs_pinyin/HISTORY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
CS Pinyin Change History
=======================

1.4 (1 Aug 2024)
-----------------
* Improve IM window handling when using more than one application
* Improve multiple monitor support
* Add build script and reorganize files for Keyman 17

* Published under MIT license to keymanapp/keyboards GitHub repository

21 changes: 21 additions & 0 deletions release/c/cs_pinyin/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2003-2024 SIL International

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
28 changes: 28 additions & 0 deletions release/c/cs_pinyin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
CS-Pinyin keyboard
==================

Description
-----------

This input method extension for Keyman Desktop provides input mapping for more
than 100,000 Han characters, multi-character words, proper names, and place name
abbreviations. Supported input conventions include Pinyin, RAD-RSC and 4-corner
index (4CI).

Notes
-----

The source/build.bat for this keyboard builds the Windows executables and DLLs
required to make this keyboard work, and places the binaries in the source
folder. The binaries must be checked in.

build.bat requires VC++2019.

Links
-----

* Contact: [email protected]

Supported Platforms
-------------------
* Windows
8 changes: 8 additions & 0 deletions release/c/cs_pinyin/cs_pinyin.kpj
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<KeymanDeveloperProject>
<Options>
<Version>2.0</Version>
<CompilerWarningsAsErrors>True</CompilerWarningsAsErrors>
<SkipMetadataFiles>True</SkipMetadataFiles>
</Options>
</KeymanDeveloperProject>
Binary file added release/c/cs_pinyin/extra/CS-Pinyin.doc
Binary file not shown.
Binary file added release/c/cs_pinyin/extra/CS-Pinyin/CS-Pinyin.cfg
Binary file not shown.
8 changes: 8 additions & 0 deletions release/c/cs_pinyin/extra/CS-Pinyin/Make Full CFG.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
copy /b "Part 1 - Header and Punctuation.txt" CS-Pinyin.cfg
copy /b CS-Pinyin.cfg + "Part 2 - Single characters.txt"
copy /b CS-Pinyin.cfg + "Part 3 - Binomes and Polynomes.txt"
copy /b CS-Pinyin.cfg + "Part 4 - Acronyms.txt"
copy /b CS-Pinyin.cfg + "Part 5 - RAD-RSC.txt"
copy /b CS-Pinyin.cfg + "Part 6 - 4CI.txt"


Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added release/c/cs_pinyin/extra/CS-Pinyin/database.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added release/c/cs_pinyin/extra/cjkdict.zip
Binary file not shown.
2 changes: 2 additions & 0 deletions release/c/cs_pinyin/source/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.vs/
**/*.vcxproj.user
Binary file added release/c/cs_pinyin/source/KeymnIMX.dll
Binary file not shown.
Binary file added release/c/cs_pinyin/source/KeymnIMX.x64.dll
Binary file not shown.
15 changes: 15 additions & 0 deletions release/c/cs_pinyin/source/build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@echo off

if "%1" == "--debug" (
set CONFIG=Debug
) else (
set CONFIG=Release
)

msbuild keymanimx/KeymanIMX.vcxproj /p:Platform=Win32 /p:Configuration=%CONFIG%
msbuild keymanimx/KeymanIMX.vcxproj /p:Platform=x64 /p:Configuration=%CONFIG%
msbuild imxconfig/imxconfig.vcxproj /p:Platform=Win32 /p:Configuration=%CONFIG%
msbuild imxreload/imxreload.vcxproj /p:Platform=Win32 /p:Configuration=%CONFIG%
copy ..\build\KeymanIMX\Win32\%CONFIG%\KeymnIMX.dll ..\source
copy ..\build\KeymanIMX\x64\%CONFIG%\KeymnIMX.x64.dll ..\source
copy ..\build\imxconfig\Win32\%CONFIG%\imxconfig.exe ..\source
Binary file added release/c/cs_pinyin/source/cs_pinyin.cfg
Binary file not shown.
Binary file added release/c/cs_pinyin/source/cs_pinyin.cfx
Binary file not shown.
40 changes: 40 additions & 0 deletions release/c/cs_pinyin/source/cs_pinyin.kmn
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
store(&VERSION) '9.0'
store(&HOTKEY) '[Ctrl Alt K_S]'
store(&BITMAP) 'images\CS-Pinyin Icon.bmp'

store(&mnemoniclayout) '1'
store(&COPYRIGHT) 'SIL International'
store(&NAME) 'Simplified Chinese'
store(&KEYBOARDVERSION) '1.4'

begin Unicode > use(main)

c Use an 8.3 name for compatibility with Win 9x
store(DLLFunction) "KeymnIMX.DLL:FindGlyph"

store(VKeys) [K_ESC][' '][K_BKSP][K_PGUP][K_PGDN][K_LEFT][K_RIGHT][K_UP][K_DOWN][K_ENTER][K_HOME][K_END][K_F24]
store(NPKeys) [K_NP0][K_NP1][K_NP2][K_NP3][K_NP4][K_NP5][K_NP6][K_NP7][K_NP8][K_NP9][K_NPSTAR][K_NPPLUS][K_NPMINUS][K_NPDOT]

store(FKeys) [K_F1][K_F2][K_F3][K_F4][K_F5][K_F6][K_F7][K_F8][K_F9][K_F10][K_F11][K_F12]
store(SFKeys) [SHIFT K_F1][SHIFT K_F2][SHIFT K_F3][SHIFT K_F4][SHIFT K_F5][SHIFT K_F6] \
[SHIFT K_F7][SHIFT K_F8][SHIFT K_F9][SHIFT K_F10][SHIFT K_F11][SHIFT K_F12]
store(CFKeys) [CTRL K_F1][CTRL K_F2][CTRL K_F3][CTRL K_F4][CTRL K_F5][CTRL K_F6] \
[CTRL K_F7][CTRL K_F8][CTRL K_F9][CTRL K_F10][CTRL K_F11][CTRL K_F12]

group(main) using keys

c any virtual keys that need to be processed must be explicitly matched
+ any(VKeys) > call(DLLFunction)
+ any(NPKeys) > call(DLLFunction)

c enable the following lines to allow Function keys, with Shift or Ctrl modifiers
c to be passed to the IMX DLL. Comment them out otherwise.
+ any(FKeys) > call(DLLFunction)
+ any(SFKeys) > call(DLLFunction)
+ any(CFKeys) > call(DLLFunction)

c the configuration hotkey must also be explicitly matched
+ [CTRL SHIFT '`'] > call(DLLFunction)

c normal ASCII keys will match on the nomatch rule
nomatch > call(DLLFunction)
133 changes: 133 additions & 0 deletions release/c/cs_pinyin/source/cs_pinyin.kps
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
<?xml version="1.0" encoding="utf-8"?>
<Package>
<System>
<KeymanDeveloperVersion>17.0.328.0</KeymanDeveloperVersion>
<FileVersion>7.0</FileVersion>
</System>
<Options>
<ExecuteProgram></ExecuteProgram>
<ReadMeFile>docs\readme.htm</ReadMeFile>
<GraphicFile>images\CS-Pinyin Install.bmp</GraphicFile>
<LicenseFile>..\LICENSE.md</LicenseFile>
<WelcomeFile>docs\welcome.htm</WelcomeFile>
<MSIFileName></MSIFileName>
<MSIOptions></MSIOptions>
<FollowKeyboardVersion/>
</Options>
<StartMenu>
<Folder>Simplified Chinese</Folder>
<AddUninstallEntry/>
<Items>
<Item>
<Name>Using Simplified Chinese (PDF)</Name>
<FileName>Using Simplified Chinese.pdf</FileName>
<Arguments></Arguments>
<Icon></Icon>
<Location>psmelStartMenu</Location>
</Item>
<Item>
<Name>Welcome</Name>
<FileName>CS-Pinyin ReadMe.html</FileName>
<Arguments></Arguments>
<Icon></Icon>
<Location>psmelStartMenu</Location>
</Item>
<Item>
<Name>About the Four Corner Method</Name>
<FileName>About the Four Corner Method.pdf</FileName>
<Arguments></Arguments>
<Icon></Icon>
<Location>psmelStartMenu</Location>
</Item>
</Items>
</StartMenu>
<Info>
<Name URL="">Simplified Chinese</Name>
<Version URL=""></Version>
<Copyright URL="">© SIL International</Copyright>
<Author URL="mailto:[email protected]">SIL International</Author>
<WebSite URL="https://keyman.com/">https://keyman.com/</WebSite>
</Info>
<Files>
<File>
<Name>..\build\cs_pinyin.kmx</Name>
<Description>Keyboard CS-Pinyin</Description>
<CopyLocation>0</CopyLocation>
<FileType>.kmx</FileType>
</File>
<File>
<Name>images\CS-Pinyin Install.bmp</Name>
<Description>File CS-Pinyin Install.bmp</Description>
<CopyLocation>0</CopyLocation>
<FileType>.bmp</FileType>
</File>
<File>
<Name>docs\welcome.htm</Name>
<Description>File welcome.htm</Description>
<CopyLocation>0</CopyLocation>
<FileType>.htm</FileType>
</File>
<File>
<Name>docs\About the Four Corner Method.pdf</Name>
<Description>File About the Four Corner Method.pdf</Description>
<CopyLocation>0</CopyLocation>
<FileType>.pdf</FileType>
</File>
<File>
<Name>docs\Using Simplified Chinese.pdf</Name>
<Description>File Using Simplified Chinese.pdf</Description>
<CopyLocation>0</CopyLocation>
<FileType>.pdf</FileType>
</File>
<File>
<Name>cs_pinyin.cfx</Name>
<Description>File cs_pinyin.cfx</Description>
<CopyLocation>0</CopyLocation>
<FileType>.cfx</FileType>
</File>
<File>
<Name>..\source\KeymnIMX.x64.dll</Name>
<Description>File KeymnIMX.x64.dll</Description>
<CopyLocation>0</CopyLocation>
<FileType>.dll</FileType>
</File>
<File>
<Name>..\source\imxconfig.exe</Name>
<Description>File imxconfig.exe</Description>
<CopyLocation>0</CopyLocation>
<FileType>.exe</FileType>
</File>
<File>
<Name>..\LICENSE.md</Name>
<Description>File LICENSE.md</Description>
<CopyLocation>0</CopyLocation>
<FileType>.md</FileType>
</File>
<File>
<Name>..\source\KeymnIMX.dll</Name>
<Description>File KeymnIMX.dll</Description>
<CopyLocation>0</CopyLocation>
<FileType>.dll</FileType>
</File>
<File>
<Name>docs\readme.htm</Name>
<Description>File readme.htm</Description>
<CopyLocation>0</CopyLocation>
<FileType>.htm</FileType>
</File>
</Files>
<Keyboards>
<Keyboard>
<Name>Simplified Chinese</Name>
<ID>cs_pinyin</ID>
<Version>1.4</Version>
<Languages>
<Language ID="zh">Chinese</Language>
</Languages>
</Keyboard>
</Keyboards>
<RelatedPackages>
<RelatedPackage ID="cs-pinyin" Relationship="deprecates"/>
</RelatedPackages>
<Strings/>
</Package>
51 changes: 51 additions & 0 deletions release/c/cs_pinyin/source/cs_pinyin.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31313.79
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KeymanIMX", "keymanimx\KeymanIMX.vcxproj", "{F00D56AD-FFA9-4012-95D4-4ED8FA00DDEC}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "imxconfig", "imxconfig\imxconfig.vcxproj", "{4F2ED8DE-8B20-46E4-96F5-F8DD0BF26504}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "imxreload", "imxreload\imxreload.vcxproj", "{838D3D6C-F6E5-461E-ABF1-DC7053AC77D2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F00D56AD-FFA9-4012-95D4-4ED8FA00DDEC}.Debug|Win32.ActiveCfg = Debug|Win32
{F00D56AD-FFA9-4012-95D4-4ED8FA00DDEC}.Debug|Win32.Build.0 = Debug|Win32
{F00D56AD-FFA9-4012-95D4-4ED8FA00DDEC}.Debug|x64.ActiveCfg = Debug|x64
{F00D56AD-FFA9-4012-95D4-4ED8FA00DDEC}.Debug|x64.Build.0 = Debug|x64
{F00D56AD-FFA9-4012-95D4-4ED8FA00DDEC}.Release|Win32.ActiveCfg = Release|Win32
{F00D56AD-FFA9-4012-95D4-4ED8FA00DDEC}.Release|Win32.Build.0 = Release|Win32
{F00D56AD-FFA9-4012-95D4-4ED8FA00DDEC}.Release|x64.ActiveCfg = Release|x64
{F00D56AD-FFA9-4012-95D4-4ED8FA00DDEC}.Release|x64.Build.0 = Release|x64
{4F2ED8DE-8B20-46E4-96F5-F8DD0BF26504}.Debug|Win32.ActiveCfg = Debug|Win32
{4F2ED8DE-8B20-46E4-96F5-F8DD0BF26504}.Debug|Win32.Build.0 = Debug|Win32
{4F2ED8DE-8B20-46E4-96F5-F8DD0BF26504}.Debug|x64.ActiveCfg = Debug|x64
{4F2ED8DE-8B20-46E4-96F5-F8DD0BF26504}.Debug|x64.Build.0 = Debug|x64
{4F2ED8DE-8B20-46E4-96F5-F8DD0BF26504}.Release|Win32.ActiveCfg = Release|Win32
{4F2ED8DE-8B20-46E4-96F5-F8DD0BF26504}.Release|Win32.Build.0 = Release|Win32
{4F2ED8DE-8B20-46E4-96F5-F8DD0BF26504}.Release|x64.ActiveCfg = Release|x64
{4F2ED8DE-8B20-46E4-96F5-F8DD0BF26504}.Release|x64.Build.0 = Release|x64
{838D3D6C-F6E5-461E-ABF1-DC7053AC77D2}.Debug|Win32.ActiveCfg = Debug|Win32
{838D3D6C-F6E5-461E-ABF1-DC7053AC77D2}.Debug|Win32.Build.0 = Debug|Win32
{838D3D6C-F6E5-461E-ABF1-DC7053AC77D2}.Debug|x64.ActiveCfg = Debug|x64
{838D3D6C-F6E5-461E-ABF1-DC7053AC77D2}.Debug|x64.Build.0 = Debug|x64
{838D3D6C-F6E5-461E-ABF1-DC7053AC77D2}.Release|Win32.ActiveCfg = Release|Win32
{838D3D6C-F6E5-461E-ABF1-DC7053AC77D2}.Release|Win32.Build.0 = Release|Win32
{838D3D6C-F6E5-461E-ABF1-DC7053AC77D2}.Release|x64.ActiveCfg = Release|x64
{838D3D6C-F6E5-461E-ABF1-DC7053AC77D2}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A5469622-41A5-4208-B8F8-B7DD2821F94E}
EndGlobalSection
EndGlobal
Binary file not shown.
Binary file added release/c/cs_pinyin/source/docs/CS-Pinyin.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
53 changes: 53 additions & 0 deletions release/c/cs_pinyin/source/docs/readme.htm
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<html><head><title>Simplified Chinese Input Method</title>
<style>

img {border: none; }

p {font-size: 10pt; margin:5px 0px 0px;}

h1, h2, h3{color: #AD4A28; font-weight: bold;}

h1 {font-size: 22pt; margin: 22px 0px 11px; padding:0px;}
h2 {font-size: 14pt; margin: 14px 0px 7px; padding:0px;}
h3 {font-size: 12pt; margin: 12px 0px 6px; padding:0px;}
h4 {font-size: 10pt; margin: 10px 0px 5px; padding:0px;}


a:link {color: #AD4A28; text-decoration: none;}
a:visited {color: #AD4A28;text-decoration: none;}
a:hover {color: #AD4A28;text-decoration: underline;}
</style>
</head>
<body>

<h1>Simplified Chinese</h1>
<h2>An Input Method for Keyman Desktop</h2>
<h3>Description</h3>
<p>This input method extension for
Keyman Desktop provides input mapping for more than
100,000 Han characters, multi-character
words, proper names, and place name abbreviations.
Supported input conventions include Pinyin,
RAD-RSC and 4-corner index (4CI).
</p>

<h3>Copyright</h3>

<p>
This input method extension is copyright 2003-2024
by SIL International, and can be freely redistributed,
but no part may be re-packaged, reverse-engineered,
or sold. Wordlists used in this input mapping
extension have been prepared by and are copyright
by Linguasoft.
</p>

<p>
For further information, refer to the user
documentation included (and installed) with the
package, visit the Keyman website
<a target='_blank' href='https://keyman.com/'>https://keyman.com/</a>, or email us
at <a href='mailto:[email protected]'>[email protected]</a>.
</p>

</body></html>
Loading