diff --git a/data/keyboards/terminal.yaml b/data/keyboards/terminal.yaml new file mode 100644 index 00000000..b6e9ba92 --- /dev/null +++ b/data/keyboards/terminal.yaml @@ -0,0 +1,34 @@ +--- +bounds: { x: 0, y: 0.33, width: 360, height: 210 } + +outlines: + default: + bounds: { x: 0, y: 0, width: 37.46341, height: 52 } + altline: + bounds: { x: 0, y: 0, width: 48.39024, height: 52 } + +views: + base: + - "PgUp ↑ PgDn" + - "← ↓ →" + +buttons: + PgUp: + outline: "altline" + keysym: "Page_Up" + PgDn: + outline: "altline" + keysym: "Page_Down" + "↑": + outline: "altline" + keysym: "Up" + "↓": + outline: "altline" + keysym: "Down" + "←": + outline: "altline" + keysym: "Left" + "→": + outline: "altline" + keysym: "Right" + diff --git a/eekboard/eekboard-context-service.c b/eekboard/eekboard-context-service.c index 962be75a..5784502f 100644 --- a/eekboard/eekboard-context-service.c +++ b/eekboard/eekboard-context-service.c @@ -236,6 +236,9 @@ eekboard_context_service_update_layout(EekboardContextService *context, enum squ case ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_PHONE: keyboard_layout = g_strdup("number"); break; + case ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_TERMINAL: + keyboard_layout = g_strdup("terminal"); + break; default: ; } diff --git a/src/resources.rs b/src/resources.rs index 751c6ee7..b17b0ef5 100644 --- a/src/resources.rs +++ b/src/resources.rs @@ -24,6 +24,7 @@ const KEYBOARDS: &[(*const str, *const str)] = &[ ("no", include_str!("../data/keyboards/no.yaml")), ("number", include_str!("../data/keyboards/number.yaml")), ("se", include_str!("../data/keyboards/se.yaml")), + ("terminal", include_str!("../data/keyboards/terminal.yaml")), // Overlays ("emoji", include_str!("../data/keyboards/emoji.yaml")), ]; diff --git a/tests/meson.build b/tests/meson.build index 205f2e9b..6b88b9b9 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -58,6 +58,7 @@ foreach layout : [ 'no', 'number', 'se', + 'terminal', 'emoji', ]