feat(keyboard): add URL mode with 3x3 snippet grid aligned to bottom row

This commit is contained in:
pablohc
2026-04-15 11:58:21 +02:00
committed by jpirnay
parent 0491587df8
commit 155650d23c
2 changed files with 143 additions and 39 deletions
@@ -57,6 +57,11 @@ class KeyboardEntryActivity : public Activity {
bool downHeld = false;
bool downLongHandled = false;
bool urlMode = false;
static constexpr int URL_SNIPPET_COUNT = 9;
static constexpr const char* const urlSnippets[URL_SNIPPET_COUNT] = {
"https://", "www.", ".com", "http://", "192.168.", ".org", "/opds", ":8080", ".net"};
void onComplete(std::string text);
void onCancel();
@@ -157,10 +162,12 @@ class KeyboardEntryActivity : public Activity {
static const char* const shiftString[2];
int getContentRowCount() const;
int getContentColCount() const;
int getTotalRowCount() const;
bool isBottomRow(int row) const;
char getSelectedChar() const;
char getAlternativeChar() const;
bool handleKeyPress();
bool insertChar(char c);
void insertString(const std::string& str);
};