Layouts, iPad-style rendering, taps, shift and layers
- JSON layouts (en-US, sv-SE inheriting number/symbol layers via base) - LayoutModel + KeyGeometry: proportional rows, nearest-key hit testing - KeyboardSurface: multi-pointer touch/mouse routing to the controller - KeyboardController + ShiftState: iOS shift/caps-lock, layers, globe, dismiss - QML view with light/dark iPad palette and drag handle - DevHooks: SLOPOSK_AUTOTYPE, SLOPOSK_SCREENSHOT for headless checks - Unit tests for shift, loader, geometry and controller Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include "Layout.h"
|
||||
|
||||
#include <QRectF>
|
||||
#include <QSizeF>
|
||||
|
||||
struct KeyboardMetrics {
|
||||
qreal padding = 6; // around the whole keyboard
|
||||
qreal gap = 8; // between keys, horizontally and vertically
|
||||
};
|
||||
|
||||
// Lays out a layer's keys to fill `size`. Returns one rect per key, in row
|
||||
// order (spacers included). One key unit has the same width in every row, so
|
||||
// rows with equal unit totals line up; shorter rows are centered.
|
||||
QList<QRectF> computeKeyRects(const Layer &layer, QSizeF size, KeyboardMetrics metrics = {});
|
||||
Reference in New Issue
Block a user