Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Map space/x to page_down/page_up when lookup table is active.

Also pass Left and Right to Skk.Context.process_key_event.
  • Loading branch information...
commit 5b6a94759ff64e108b2ba62f7b88e2b0aadbff33 1 parent 27f68b4
@ueno authored
Showing with 25 additions and 1 deletion.
  1. +25 −1 src/engine.vala
View
26 src/engine.vala
@@ -375,9 +375,27 @@ class SkkEngine : IBus.Engine {
}
return true;
}
+ else if (state == 0 && ((unichar) keyval) == 'x') {
+ if (lookup_table.page_up ()) {
+ update_lookup_table (lookup_table, true);
+ var page_size = lookup_table.get_page_size ();
+ if (context.candidates.cursor_pos > page_size)
+ context.candidates.cursor_pos -= (int) page_size;
+ }
+ return true;
+ }
+ else if (state == 0 && keyval == IBus.space) {
+ if (lookup_table.page_down ()) {
+ update_lookup_table (lookup_table, true);
+ var page_size = lookup_table.get_page_size ();
+ if (context.candidates.cursor_pos < context.candidates.size - page_size)
+ context.candidates.cursor_pos += (int) page_size;
+ }
+ return true;
+ }
else if (state == 0) {
var page_size = lookup_table.get_page_size ();
- string label = ((unichar)keyval).tolower ().to_string ();
+ string label = ((unichar) keyval).tolower ().to_string ();
for (var index = 0;
index < int.min ((int)page_size, LOOKUP_TABLE_LABELS.length);
index++) {
@@ -426,6 +444,12 @@ class SkkEngine : IBus.Engine {
else if (keyval == IBus.Henkan) {
name = "rshift";
}
+ else if (keyval == IBus.Left) {
+ name = "Left";
+ }
+ else if (keyval == IBus.Right) {
+ name = "Right";
+ }
else if (0x20 <= keyval && keyval < 0x7F) {
code = (unichar) keyval;
}
Please sign in to comment.
Something went wrong with that request. Please try again.