Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LatinIME
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
keyboard
LatinIME
Commits
5f6c303f
Commit
5f6c303f
authored
10 years ago
by
Jean Chalard
Browse files
Options
Downloads
Patches
Plain Diff
[HW2] Have a script for hardware keyboard
Change-Id: I3ee85867c529156374ecc17db3243a50912e760b
parent
87d907bd
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
+4
-0
4 additions, 0 deletions
...rc/com/android/inputmethod/keyboard/KeyboardSwitcher.java
java/src/com/android/inputmethod/latin/utils/ScriptUtils.java
+4
-0
4 additions, 0 deletions
.../src/com/android/inputmethod/latin/utils/ScriptUtils.java
with
8 additions
and
0 deletions
java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
+
4
−
0
View file @
5f6c303f
...
...
@@ -39,6 +39,7 @@ import com.android.inputmethod.latin.SubtypeSwitcher;
import
com.android.inputmethod.latin.WordComposer
;
import
com.android.inputmethod.latin.settings.SettingsValues
;
import
com.android.inputmethod.latin.utils.ResourceUtils
;
import
com.android.inputmethod.latin.utils.ScriptUtils
;
public
final
class
KeyboardSwitcher
implements
KeyboardState
.
SwitchActions
{
private
static
final
String
TAG
=
KeyboardSwitcher
.
class
.
getSimpleName
();
...
...
@@ -372,6 +373,9 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
}
public
int
getCurrentKeyboardScriptId
()
{
if
(
null
==
mKeyboardLayoutSet
)
{
return
ScriptUtils
.
SCRIPT_UNKNOWN
;
}
return
mKeyboardLayoutSet
.
getScriptId
();
}
}
This diff is collapsed.
Click to expand it.
java/src/com/android/inputmethod/latin/utils/ScriptUtils.java
+
4
−
0
View file @
5f6c303f
...
...
@@ -23,6 +23,8 @@ import java.util.TreeMap;
* A class to help with handling different writing scripts.
*/
public
class
ScriptUtils
{
// Used for hardware keyboards
public
static
final
int
SCRIPT_UNKNOWN
=
-
1
;
// TODO: should we use ISO 15924 identifiers instead?
public
static
final
int
SCRIPT_LATIN
=
0
;
public
static
final
int
SCRIPT_CYRILLIC
=
1
;
...
...
@@ -89,6 +91,8 @@ public class ScriptUtils {
return
(
codePoint
>=
0x370
&&
codePoint
<=
0x3FF
)
||
(
codePoint
>=
0x1F00
&&
codePoint
<=
0x1FFF
)
||
codePoint
==
0xF2
;
case
SCRIPT_UNKNOWN:
return
true
;
default
:
// Should never come here
throw
new
RuntimeException
(
"Impossible value of script: "
+
script
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment