Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
9
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
fcitx
fcitx-skk
Commits
d1abab21
Commit
d1abab21
authored
Dec 08, 2014
by
Naoaki Iwakiri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
candidate selection key config
parent
6a6eddb7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
1 deletion
+35
-1
src/fcitx-skk.desc
src/fcitx-skk.desc
+10
-0
src/skk-config.c
src/skk-config.c
+1
-0
src/skk.c
src/skk.c
+14
-1
src/skk.h
src/skk.h
+10
-0
No files found.
src/fcitx-skk.desc
View file @
d1abab21
...
...
@@ -52,5 +52,15 @@ Type=Boolean
Description=Show Annotation
DefaultValue=True
[General/CandidateChooseKey]
Type=Enum
Description=Keys to Select from Candidate Window
EnumCount=3
Enum0=Digit (0,1,2,...)
Enum1=ABC (a,b,c,...)
Enum2=Qwerty Center Row (a,s,d,...)
DefaultValue=Digit (0,1,2,...)
[DescriptionFile]
LocaleDomain=fcitx-skk
src/skk-config.c
View file @
d1abab21
...
...
@@ -27,4 +27,5 @@ CONFIG_BINDING_REGISTER("General", "CandidateLayout", candidateLayout)
CONFIG_BINDING_REGISTER
(
"General"
,
"NTriggersToShowCandWin"
,
nTriggersToShowCandWin
)
CONFIG_BINDING_REGISTER
(
"General"
,
"ShowAnnotation"
,
showAnnotation
)
CONFIG_BINDING_REGISTER
(
"General"
,
"EggLikeNewLine"
,
eggLikeNewLine
)
CONFIG_BINDING_REGISTER
(
"General"
,
"CandidateChooseKey"
,
candidateChooseKey
)
/* candidate selection keys */
CONFIG_BINDING_END
()
src/skk.c
View file @
d1abab21
...
...
@@ -630,7 +630,20 @@ FcitxSkkGetCandWords(void *arg)
FcitxInputState
*
input
=
FcitxInstanceGetInputState
(
skk
->
owner
);
FcitxCandidateWordList
*
candList
=
FcitxInputStateGetCandidateList
(
input
);
SkkCandidateList
*
skkCandList
=
skk_context_get_candidates
(
skk
->
context
);
FcitxCandidateWordSetChoose
(
candList
,
DIGIT_STR_CHOOSE
);
switch
(
skk
->
config
.
candidateChooseKey
){
case
ChooseABCD
:
FcitxCandidateWordSetChoose
(
candList
,
ABCD_STR_CHOOSE
);
break
;
case
ChooseASDF
:
FcitxCandidateWordSetChoose
(
candList
,
ASDF_STR_CHOOSE
);
break
;
case
ChooseDigit
:
// FALL THRU
default:
FcitxCandidateWordSetChoose
(
candList
,
DIGIT_STR_CHOOSE
);
break
;
}
FcitxCandidateWordSetPageSize
(
candList
,
skk
->
config
.
pageSize
);
FcitxCandidateWordSetLayoutHint
(
candList
,
skk
->
config
.
candidateLayout
);
...
...
src/skk.h
View file @
d1abab21
...
...
@@ -33,6 +33,15 @@
#define _(x) dgettext("fcitx-skk", x)
#define N_(x) (x)
#define ABCD_STR_CHOOSE "abcdefghij"
#define ASDF_STR_CHOOSE "asdfghjkl;"
typedef
enum
_FcitxSkkChooseKeyType
{
ChooseDigit
,
ChooseABCD
,
ChooseASDF
}
FcitxSkkChooseKeyType
;
typedef
struct
_FcitxSkkConfig
{
FcitxGenericConfig
gconfig
;
SkkPeriodStyle
punctuationStyle
;
...
...
@@ -42,6 +51,7 @@ typedef struct _FcitxSkkConfig {
int
pageSize
;
boolean
showAnnotation
;
boolean
eggLikeNewLine
;
FcitxSkkChooseKeyType
candidateChooseKey
;
}
FcitxSkkConfig
;
typedef
struct
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment