Skip to content

Commit

Permalink
Add Colemak-DH key mappings (#16)
Browse files Browse the repository at this point in the history
* Add Colemak-DH ANSI
* Add Colemak-DH Orth
* Add THL & MPS2 Pinyin
  • Loading branch information
mlouielu authored and wengxt committed May 3, 2024
1 parent bb35948 commit 254f8ab
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 14 deletions.
19 changes: 15 additions & 4 deletions src/eim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,21 @@ namespace {

constexpr int CHEWING_MAX_LEN = 18;

std::string builtin_keymaps[] = {
"KB_DEFAULT", "KB_HSU", "KB_IBM", "KB_GIN_YEIH",
"KB_ET", "KB_ET26", "KB_DVORAK", "KB_DVORAK_HSU",
"KB_DACHEN_CP26", "KB_HANYU_PINYIN", "KB_CARPALX"};
std::string builtin_keymaps[] = {"KB_DEFAULT",
"KB_HSU",
"KB_IBM",
"KB_GIN_YEIH",
"KB_ET",
"KB_ET26",
"KB_DVORAK",
"KB_DVORAK_HSU",
"KB_DACHEN_CP26",
"KB_HANYU_PINYIN",
"KB_THL_PINYIN",
"KB_MPS2_PINYIN",
"KB_CARPALX",
"KB_COLEMAK_DH_ANSI",
"KB_COLEMAK_DH_ORTH"};

const char *builtin_selectkeys[] = {
"1234567890", "asdfghjkl;", "asdfzxcv89", "asdfjkl789",
Expand Down
26 changes: 16 additions & 10 deletions src/eim.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,28 @@ enum class ChewingLayout {
DvorakHsu,
DACHEN_CP26,
HanYuPinYin,
Carpalx
ThlPinYin,
Mps2PinYin,
Carpalx,
ColemakDH_ANSI,
ColemakDH_ORTH
};
FCITX_CONFIG_ENUM_NAME(ChewingLayout, "Default Keyboard", "Hsu's Keyboard",
"IBM Keyboard", "Gin-Yieh Keyboard", "ETen Keyboard",
"ETen26 Keyboard", "Dvorak Keyboard",
"Dvorak Keyboard with Hsu's support",
"DACHEN_CP26 Keyboard", "Han-Yu PinYin Keyboard",
"Carpalx Keyboard");
FCITX_CONFIG_ENUM_I18N_ANNOTATION(ChewingLayout, N_("Default Keyboard"),
N_("Hsu's Keyboard"), N_("IBM Keyboard"),
N_("Gin-Yieh Keyboard"), N_("ETen Keyboard"),
N_("ETen26 Keyboard"), N_("Dvorak Keyboard"),
N_("Dvorak Keyboard with Hsu's support"),
N_("DACHEN_CP26 Keyboard"),
N_("Han-Yu PinYin Keyboard"),
N_("Carpalx Keyboard"));
"THL PinYin Keyboard", "MPS2 PinYin Keyboard",
"Carpalx Keyboard", "Colemak-DH ANSI Keyboard",
"Colemak-DH Orth Keyboard");
FCITX_CONFIG_ENUM_I18N_ANNOTATION(
ChewingLayout, N_("Default Keyboard"), N_("Hsu's Keyboard"),
N_("IBM Keyboard"), N_("Gin-Yieh Keyboard"), N_("ETen Keyboard"),
N_("ETen26 Keyboard"), N_("Dvorak Keyboard"),
N_("Dvorak Keyboard with Hsu's support"), N_("DACHEN_CP26 Keyboard"),
N_("Han-Yu PinYin Keyboard"), N_("THL PinYin Keyboard"),
N_("MPS2 PinYin Keyboard"), N_("Carpalx Keyboard"),
N_("Colemak-DH ANSI Keyboard"), N_("Colemak-DH Orth Keyboard"));

enum class SwitchInputMethodBehavior { Clear, CommitPreedit, CommitDefault };

Expand Down

0 comments on commit 254f8ab

Please sign in to comment.