mirror of
https://github.com/jjsullivan5196/wvkbd.git
synced 2025-07-13 06:24:29 +02:00
Made 'full' and 'simple' layouts less prone to mistyping and improved layout switching
- The full layout now squashes less keys in a row, to accomplish this the semicolon/colon, equal/plus and alt keys had to be sacrificed from the full layout (they're on the special/symbols layout still). - The half-keys in the simple layout are removed, giving a bit more space. - The default total keyboard height has been slightly enlarged (10px) - The compose key moved down, it was too close to the 'a' (accidental presses). The tab key moved to the top-right. - The spacing between the buttons is slightly larger (aesthetic only) - The key for layer switching is now labelled more consistently with an icon, and indicates direction of switching with an arrow - An extra "index" layout was added that can be activated by pressing Compose + the next/prev layout button. It has a key for each layout, even those not specified at start. This special layout does not appear in the normal layer cycling. - The "Abc" key on secondary layers returns to the last alphabetical layout - The compose layouts automatically hide when the user presses the space where there are no keys, no need to explicitly press the "Abc" key.
This commit is contained in:
@ -81,6 +81,7 @@ struct layout {
|
||||
struct key *keys;
|
||||
const char *keymap_name;
|
||||
const char *name;
|
||||
bool abc; //is this an alphabetical/abjad layout or not? (i.e. something that is a primary input layout)
|
||||
uint32_t keyheight; // absolute height (pixels)
|
||||
};
|
||||
|
||||
@ -99,8 +100,10 @@ struct kbd {
|
||||
uint8_t compose;
|
||||
struct key *last_press;
|
||||
struct key *last_swipe;
|
||||
struct layout *prevlayout;
|
||||
struct layout *prevlayout; //the previous layout, needed to keep track of keymap changes
|
||||
size_t layer_index;
|
||||
struct layout *last_abc_layout; //the last alphabetical layout to fall back to (may be further away than prevlayout)
|
||||
size_t last_abc_index; //the layer index of the last alphabetical layout
|
||||
|
||||
struct layout *layouts;
|
||||
enum layout_id *layers;
|
||||
@ -119,6 +122,7 @@ void kbd_init(struct kbd *kb, struct layout *layouts,
|
||||
char *layer_names_list, char *landscape_layer_names_list);
|
||||
void kbd_init_layout(struct layout *l, uint32_t width, uint32_t height);
|
||||
struct key *kbd_get_key(struct kbd *kb, uint32_t x, uint32_t y);
|
||||
size_t kbd_get_layer_index(struct kbd *kb, struct layout *l);
|
||||
void kbd_unpress_key(struct kbd *kb, uint32_t time);
|
||||
void kbd_release_key(struct kbd *kb, uint32_t time);
|
||||
void kbd_motion_key(struct kbd *kb, uint32_t time, uint32_t x, uint32_t y);
|
||||
@ -129,7 +133,7 @@ void kbd_draw_layout(struct kbd *kb);
|
||||
void kbd_resize(struct kbd *kb, struct layout *layouts, uint8_t layoutcount);
|
||||
uint8_t kbd_get_rows(struct layout *l);
|
||||
double kbd_get_row_length(struct key *k);
|
||||
void kbd_switch_layout(struct kbd *kb, struct layout *l);
|
||||
void kbd_switch_layout(struct kbd *kb, struct layout *l, size_t layer_index);
|
||||
|
||||
void create_and_upload_keymap(struct kbd *kb, const char *name,
|
||||
uint32_t comp_unichr, uint32_t comp_shift_unichr);
|
||||
|
Reference in New Issue
Block a user