Skip to content

Commit

Permalink
larger keyboard
Browse files Browse the repository at this point in the history
  • Loading branch information
badda71 committed Apr 12, 2019
1 parent 361e005 commit c9e3796
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 79 deletions.
Binary file modified romfs/keyboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
158 changes: 79 additions & 79 deletions src/arch/sdl/uibottom.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* 3dskbd.c - 3DS virtual keyboard
* 3dskbd.c - 3DS bottom screen handling incl. virtual keyboard
*
* Written by
* Sebastian Weber <[email protected]>
Expand Down Expand Up @@ -36,87 +36,87 @@
#include "SDL/SDL_image.h"

int uikbd_pos[4][4] = {
{0,0,320,120}, // normal keys
{0,120,320,120}, // shifted keys
{0,240,320,120}, // cbm keys
{0,360,320,120} // ctrl keys
{0,0,320,152}, // normal keys
{0,152,320,152}, // shifted keys
{0,304,320,152}, // cbm keys
{0,456,320,152} // ctrl keys
};

uikbd_key uikbd_keypos[] = {
// x, y, w, h, key, row, col, sticky, name
// F-Keys
{ 283, 32, 25, 16, 133, 0, 4, 0, "F1"}, // F1 / F2
{ 283, 48, 25, 16, 134, 0, 5, 0, "F3"}, // F3 / F4
{ 283, 64, 25, 16, 135, 0, 6, 0, "F5"}, // F5 / F6
{ 283, 80, 25, 17, 136, 0, 3, 0, "F7"}, // F7 / F8
// top row
{ 16, 32, 16, 16, 95, 7, 1, 0, "ArrowLeft"}, // <-
{ 32, 32, 16, 16, 49, 7, 0, 0, "1"}, // 1 / !
{ 48, 32, 16, 16, 50, 7, 3, 0, "2"}, // 2 / "
{ 64, 32, 16, 16, 51, 1, 0, 0, "3"}, // 3 / #
{ 80, 32, 16, 16, 52, 1, 3, 0, "4"}, // 4 / $
{ 96, 32, 16, 16, 53, 2, 0, 0, "5"}, // 5 / %
{ 112, 32, 16, 16, 54, 2, 3, 0, "6"}, // 6 / &
{ 128, 32, 16, 16, 55, 3, 0, 0, "7"}, // 7 / '
{ 144, 32, 16, 16, 56, 3, 3, 0, "8"}, // 8 / (
{ 160, 32, 16, 16, 57, 4, 0, 0, "9"}, // 9 / )
{ 176, 32, 16, 16, 48, 4, 3, 0, "0"}, // 0 / 0
{ 192, 32, 16, 16, 43, 5, 0, 0, "+"}, // + / +
{ 208, 32, 16, 16, 45, 5, 3, 0, "-"}, // - / |
{ 224, 32, 16, 16, 92, 6, 0, 0, "Pound"}, // Pound / ..
{ 240, 32, 16, 16, 19, 6, 3, 0, "CLR"}, // CLR/HOME
{ 256, 32, 17, 16, 20, 0, 0, 0, "INST"}, // INST/DEL
// 2nd row
{ 16, 48, 24, 16, 24, 7, 2, 4, "CTRL"}, // CTRL - sticky ctrl
{ 40, 48, 16, 16, 113, 7, 6, 0, "Q"}, // Q
{ 56, 48, 16, 16, 119, 1, 1, 0, "W"}, // W
{ 72, 48, 16, 16, 101, 1, 6, 0, "E"}, // E
{ 88, 48, 16, 16, 114, 2, 1, 0, "R"}, // R
{ 104, 48, 16, 16, 116, 2, 6, 0, "T"}, // T
{ 120, 48, 16, 16, 121, 3, 1, 0, "Y"}, // Y
{ 136, 48, 16, 16, 117, 3, 6, 0, "U"}, // U
{ 152, 48, 16, 16, 105, 4, 1, 0, "I"}, // I
{ 168, 48, 16, 16, 111, 4, 6, 0, "O"}, // O
{ 184, 48, 16, 16, 112, 5, 1, 0, "P"}, // P
{ 200, 48, 16, 16, 64, 5, 6, 0, "@"}, // @
{ 216, 48, 16, 16, 42, 6, 1, 0, "*"}, // *
{ 232, 48, 16, 16, 94, 6, 6, 0, "ArrowUp"}, // ^| / π
{ 248, 48, 25, 16, 25, -3, 0, 0, "RESTORE"}, // RESTORE
// 3rd row
{ 16, 64, 16, 16, 3, 7, 7, 0, "R/S"}, // RUN/STOP
{ 32, 64, 16, 16, 21, 1, 7, 1, "S/L"}, // SHIFT LOCK - sticky shift
{ 48, 64, 16, 16, 97, 1, 2, 0, "A"}, // A
{ 64, 64, 16, 16, 115, 1, 5, 0, "S"}, // S
{ 80, 64, 16, 16, 100, 2, 2, 0, "D"}, // D
{ 96, 64, 16, 16, 102, 2, 5, 0, "F"}, // F
{ 112, 64, 16, 16, 103, 3, 2, 0, "G"}, // G
{ 128, 64, 16, 16, 104, 3, 5, 0, "H"}, // H
{ 144, 64, 16, 16, 106, 4, 2, 0, "J"}, // J
{ 160, 64, 16, 16, 107, 4, 5, 0, "K"}, // K
{ 176, 64, 16, 16, 108, 5, 2, 0, "L"}, // L
{ 192, 64, 16, 16, 58, 5, 5, 0, ":"}, // : / [
{ 208, 64, 16, 16, 59, 6, 2, 0, ";"}, // ; / ]
{ 224, 64, 16, 16, 61, 6, 5, 0, "="}, // =
{ 240, 64, 33, 16, 13, 0, 1, 0, "CR"}, // RETURN
// 4th row
{ 16, 80, 16, 17, 23, 7, 5, 2, "C="}, // cbm - sticky cbm
{ 32, 80, 24, 17, 21, 1, 7, 1, "LSHIFT"}, // LSHIFT - sticky shift
{ 56, 80, 16, 17, 122, 1, 4, 0, "Z"}, // Z
{ 72, 80, 16, 17, 120, 2, 7, 0, "X"}, // X
{ 88, 80, 16, 17, 99, 2, 4, 0, "C"}, // C
{ 104, 80, 16, 17, 118, 3, 7, 0, "V"}, // V
{ 120, 80, 16, 17, 98, 3, 4, 0, "B"}, // B
{ 136, 80, 16, 17, 110, 4, 7, 0, "N"}, // N
{ 152, 80, 16, 17, 109, 4, 4, 0, "M"}, // M
{ 168, 80, 16, 17, 44, 5, 7, 0, ","}, // ,
{ 184, 80, 16, 17, 46, 5, 4, 0, "."}, // .
{ 200, 80, 16, 17, 47, 6, 7, 0, "/"}, // /
{ 216, 80, 24, 17, 21, 6, 4, 1, "RSHIFT"}, // RSHIFT - sticky shift
{ 240, 80, 16, 17, 17, 0, 7, 0, "C_DOWN"}, // UP / DOWN
{ 256, 80, 17, 17, 29, 0, 2, 0, "C_RIGHT"}, // LEFT / RIGHT
// SPACE
{ 63, 97, 147, 16, 32, 7, 4, 0, "SPACE"}, // SPACE
{ 0, 0, 0, 0, 0, 0, 0, 0, ""}
// x, y, w, h, key, row, col, sticky, name
// F-Keys
{ 103, 28, 29, 20, 133, 0, 4, 0, "F1"}, // F1 / F2
{ 132, 28, 28, 20, 134, 0, 5, 0, "F3"}, // F3 / F4
{ 160, 28, 28, 20, 135, 0, 6, 0, "F5"}, // F5 / F6
{ 188, 28, 28, 20, 136, 0, 3, 0, "F7"}, // F7 / F8
// top row
{ 7, 49, 20, 20, 95, 7, 1, 0, "ArrowLeft"}, // <-
{ 27, 49, 19, 20, 49, 7, 0, 0, "1"}, // 1 / !
{ 46, 49, 19, 20, 50, 7, 3, 0, "2"}, // 2 / "
{ 65, 49, 19, 20, 51, 1, 0, 0, "3"}, // 3 / #
{ 84, 49, 19, 20, 52, 1, 3, 0, "4"}, // 4 / $
{ 103, 49, 19, 20, 53, 2, 0, 0, "5"}, // 5 / %
{ 122, 49, 19, 20, 54, 2, 3, 0, "6"}, // 6 / &
{ 141, 49, 19, 20, 55, 3, 0, 0, "7"}, // 7 / '
{ 160, 49, 19, 20, 56, 3, 3, 0, "8"}, // 8 / (
{ 179, 49, 19, 20, 57, 4, 0, 0, "9"}, // 9 / )
{ 198, 49, 19, 20, 48, 4, 3, 0, "0"}, // 0 / 0
{ 217, 49, 19, 20, 43, 5, 0, 0, "+"}, // + / +
{ 236, 49, 19, 20, 45, 5, 3, 0, "-"}, // - / |
{ 255, 49, 19, 20, 92, 6, 0, 0, "Pound"}, // Pound / ..
{ 274, 49, 19, 20, 19, 6, 3, 0, "CLR"}, // CLR/HOME
{ 293, 49, 19, 20, 20, 0, 0, 0, "INST"}, // INST/DEL
// 2nd row
{ 7, 69, 30, 19, 24, 7, 2, 4, "CTRL"}, // CTRL - sticky ctrl
{ 37, 69, 19, 19, 113, 7, 6, 0, "Q"}, // Q
{ 56, 69, 19, 19, 119, 1, 1, 0, "W"}, // W
{ 75, 69, 19, 19, 101, 1, 6, 0, "E"}, // E
{ 94, 69, 19, 19, 114, 2, 1, 0, "R"}, // R
{ 113, 69, 19, 19, 116, 2, 6, 0, "T"}, // T
{ 132, 69, 19, 19, 121, 3, 1, 0, "Y"}, // Y
{ 151, 69, 19, 19, 117, 3, 6, 0, "U"}, // U
{ 170, 69, 19, 19, 105, 4, 1, 0, "I"}, // I
{ 189, 69, 19, 19, 111, 4, 6, 0, "O"}, // O
{ 208, 69, 19, 19, 112, 5, 1, 0, "P"}, // P
{ 227, 69, 19, 19, 64, 5, 6, 0, "@"}, // @
{ 246, 69, 19, 19, 42, 6, 1, 0, "*"}, // *
{ 265, 69, 19, 19, 94, 6, 6, 0, "ArrowUp"}, // ^| / π
{ 284, 69, 28, 19, 25, -3, 0, 0, "RESTORE"}, // RESTORE
// 3rd row
{ 7, 88, 20, 19, 3, 7, 7, 0, "R/S"}, // RUN/STOP
{ 27, 88, 19, 19, 21, 1, 7, 1, "S/L"}, // SHIFT LOCK - sticky shift
{ 46, 88, 19, 19, 97, 1, 2, 0, "A"}, // A
{ 65, 88, 19, 19, 115, 1, 5, 0, "S"}, // S
{ 84, 88, 19, 19, 100, 2, 2, 0, "D"}, // D
{ 103, 88, 19, 19, 102, 2, 5, 0, "F"}, // F
{ 122, 88, 19, 19, 103, 3, 2, 0, "G"}, // G
{ 141, 88, 19, 19, 104, 3, 5, 0, "H"}, // H
{ 160, 88, 19, 19, 106, 4, 2, 0, "J"}, // J
{ 179, 88, 19, 19, 107, 4, 5, 0, "K"}, // K
{ 198, 88, 19, 19, 108, 5, 2, 0, "L"}, // L
{ 217, 88, 19, 19, 58, 5, 5, 0, ":"}, // : / [
{ 236, 88, 19, 19, 59, 6, 2, 0, ";"}, // ; / ]
{ 255, 88, 19, 19, 61, 6, 5, 0, "="}, // =
{ 274, 88, 38, 19, 13, 0, 1, 0, "CR"}, // RETURN
// 4th row
{ 7,107, 20, 19, 23, 7, 5, 2, "C="}, // cbm - sticky cbm
{ 27,107, 29, 19, 21, 1, 7, 1, "LSHIFT"}, // LSHIFT - sticky shift
{ 56,107, 19, 19, 122, 1, 4, 0, "Z"}, // Z
{ 75,107, 19, 19, 120, 2, 7, 0, "X"}, // X
{ 94,107, 19, 19, 99, 2, 4, 0, "C"}, // C
{ 113,107, 19, 19, 118, 3, 7, 0, "V"}, // V
{ 132,107, 19, 19, 98, 3, 4, 0, "B"}, // B
{ 151,107, 19, 19, 110, 4, 7, 0, "N"}, // N
{ 170,107, 19, 19, 109, 4, 4, 0, "M"}, // M
{ 189,107, 19, 19, 44, 5, 7, 0, ","}, // ,
{ 208,107, 19, 19, 46, 5, 4, 0, "."}, // .
{ 227,107, 19, 19, 47, 6, 7, 0, "/"}, // /
{ 246,107, 28, 19, 21, 6, 4, 1, "RSHIFT"}, // RSHIFT - sticky shift
{ 274,107, 19, 19, 17, 0, 7, 0, "C_DOWN"}, // UP / DOWN
{ 293,107, 19, 19, 29, 0, 2, 0, "C_RIGHT"}, // LEFT / RIGHT
// SPACE
{ 65,126, 191, 19, 32, 7, 4, 0, "SPACE"}, // SPACE
{ 0, 0, 0, 0, 0, 0, 0, 0, ""}
};

int uibottom_kbdactive = 1;
Expand Down

0 comments on commit c9e3796

Please sign in to comment.