Skip to content

UX optimizations: shortcut hub, top strip, keyboard, and connection UI#3

Merged
youyoubilly merged 42 commits intomainfrom
ux-optimizing
May 1, 2026
Merged

UX optimizations: shortcut hub, top strip, keyboard, and connection UI#3
youyoubilly merged 42 commits intomainfrom
ux-optimizing

Conversation

@youyoubilly
Copy link
Copy Markdown
Member

Summary

Merges ux-optimizing into main (42 commits).

Highlights

  • Shortcut hub / fixed top strip: paging, profile slots, Fn layer, favorite picker, Page 2 hub layout, punctuation rows, DISPLAY/FN behavior
  • Modifiers & typing: top modifier lock visuals, macOS shortcut normalization, long-press alternate popup (cardinal wash, min cell size), currency alternates on D
  • Connection / IME: BLE RSSI signal indicators, multiple connection listeners, compose/send and drawer/IME behavior, landscape dialogs

Review

Please verify on-device behavior for the fixed strip, long-press alternates, and BLE/connection flows before merge.


Auto-opened from branch ux-optimizing.

Made with Cursor

This ensures portrait shows a clean 4-button viewport with scroll, landscape auto-expands to show all top-menu buttons after rotation, and new installs default mode slots to Macros, Presentation, and Keyboard & Mouse.

Made-with: Cursor
This updates dialog sizing/layout resources for better landscape usability, introduces a shared toast limiter to prevent repetitive notifications, and keeps non-connection header actions on neutral tinting.

Made-with: Cursor
Track drawer close intent in MainActivity so keyboard focus returns after scrim/close dismiss, while navigation closes do not auto-restore and portrait IME toolbar height stays stable.

Made-with: Cursor
This centralizes send-block validation and keeps the send action clickable so users get immediate feedback about why send is unavailable.

Made-with: Cursor
…dates.

This switches connection state callbacks to a listener set so MainActivity and dialogs can observe updates together, and propagates BluetoothService connection events through ConnectionManager for consistent UI state.

Made-with: Cursor
Keep connection UI in sync with real Bluetooth link quality by polling RSSI and mapping it to signal-level icons in the header and connection dialog.

Made-with: Cursor
This shortens the compose send confirmation message and keeps the top connection icon free of RSSI signal rendering so only the connection status is shown.

Made-with: Cursor
…imary.

This replaces hardcoded modifier labels with OS-specific key definitions (including new icon assets) and updates the header connected tint to use the active theme primary color.

Made-with: Cursor
… row 1.

Add shortcut icon/display-order support in Shortcut Hub and migrate the default profile ordering to the requested 1-9 sequence for consistent top-strip rendering.

Made-with: Cursor
…r slot.

This maps Ctrl-only shortcuts to Command on macOS for top-panel/profile actions and temporarily frees row-2 col-7 while keeping the display-toggle plumbing for later placement.

Made-with: Cursor
This introduces a local Fn toggle for fixed rows 2-3, remaps PH1 to display-toggle only under Fn, restores row 3 col 7 to Right, and includes a missing target OS accessor used by shortcut modifier normalization.

Made-with: Cursor
Adds fixed-row pager UI/icon assets and updates the Default shortcut hub to remove Tab, swap Find/Redo order, and use the new search icon.

Made-with: Cursor
Swaps the page-1 keyboard toggle and Enter positions, and makes the shortcut-area local Fn key use the same on/off pressed-state coloring pattern as numpad local Fn.

Made-with: Cursor
Makes Shift/Ctrl/Alt/Win in the top shortcut rows use code-driven long-press lock with tap release/momentary behavior, keeps modifier locks independent from local Fn toggle visuals, and restores OS-aware modifier rendering.

Made-with: Cursor
Return null from resolveFixedTopLocalFnMapping for ESC (0x29) and
row-3 Alt (0xE2) so local Fn does not replace them with F5 or Delete;
labels, icons, and HID stay the normal keycap behavior.

Made-with: Cursor
…bels

- Rearrange fixed-top page 0: row2 F7–F12 + Fn; row3 F1–F6 + display toggle.
- Local Fn layer: row2 → 6–0 and +; row3 → 1–5, -, =; allow display key in Fn
  mapping and skip mode toggle while Fn is on.
- Rebuild fixed-top row panels when shortcut display mode toggles so the
  DISPLAY key icon swaps (text vs icon) instead of staying stale.
- Slightly larger top shortcut strip typography via named sp constants.

Made-with: Cursor
Seven tappable slots default to bundled profiles; tap activates profile
and updates row 1 shortcuts, long-press picks any Hub profile from prefs.
Integrate DISPLAY toggle for compact vs full profile labels. Sync active
profile across ShortcutProfileManager instances via prefs; add
reloadProfilesFromPreferences. Fix duplicate two-line labels on profile
keys. Add TopShortcutProfileSlotPrefs and picker string.

Made-with: Cursor
- ShortcutHubFragment: reload profiles on resume when detail panel is visible;
  refresh grid and category tabs after profile changes; simplify My Shortcuts
  tab so the favorites strip is the sole source for that view.
- CustomKeyboardView: long-press top-strip slots to pick a favorite; map row-1
  cells to ordered My Shortcuts indices; refresh strip and split partner after
  reassignment.
- ShortcutProfileManager: support ordered top-strip favorites and assigning a
  shortcut to a strip index.
- strings: add top-strip favorite picker title and empty message.

Made-with: Cursor
- Replace simple AlertDialog items with custom title (profile + subtitle) and
  ListView adapter showing icon/emoji, name, and KeyParser chord per shortcut;
  cap list height for long favourite lists.
- Add dialog_row_top_strip_favorite and dialog_top_strip_favorite_title layouts.
- Fixed top panel page 2: five placeholders, DISPLAY toggle, then local Fn.
- Update picker title string and add subtitle string.

Made-with: Cursor
- Page 0: F6–F12 on row 2; F1–F5, DISPLAY, and local Fn on row 3 with updated
  Fn-layer mappings (row2 → 6–0 + -; row3 → 1–5 and = for DISPLAY).
- Page 1: move IME toggle to row 2 and local Fn to row 3.
- Page 2: Shortcut Hub profile slots on the upper row; placeholders + DISPLAY +
  local Fn on the lower row.
- Add displayToggleLocalFnShowsEquals so F-row DISPLAY shows '=' under local Fn
  while Hub strip DISPLAY keeps icon/text mode visuals; align icon resolution and
  FnMapping for the non-equals case.
- Use symbolLabel in top shortcut action labels when present; bump SP sizes and
  bold non-action-label text for fixed-rows slices only.

Made-with: Cursor
Empty row-1 placeholders cleared topStripFavoriteSlotIndex, so the top
panel touch listener never scheduled the favorite picker. Assign the
global strip index for empty slots and for null shortcut keys.

Made-with: Cursor
Row-1 profile favorites use a dedicated idle drawable layered with the
theme accent wash (presentationControlButtonIdleFill) over key_bg_function,
so the strip reads separately from rows 2–3 while following Theme.KeyMod.*.

Add resolveTopPanelIdleBackgroundRes() keyed off allowTopPanelPagingGesture
for initial layout and refreshTopPanelButtonStates.

Made-with: Cursor
Wire ShortcutHub to reorder UI, drag-handle adapter, and profile updates.
Add layouts, drawable, strings, and shared row view helpers.

Made-with: Cursor
…s copy

- Replace custom tab buttons with TabLayout themed to colorPrimary
- Browse rows use bookmark add/star icons (tinted primary) to stage or remove favorites
- Add pick row layout and vector drawables; ShortcutSectionPickAdapter API refresh
- Rename My tab and related strings to My favorites; align Shortcut Hub tab and dialogs

Made-with: Cursor
- Build profile hub slot backgrounds from ThemeManager colors with
  bottom accent strip and 9dp outline clip (fixes wrong ?attr tint).
- Slightly smaller profile hub label text and longer compact name.
- Add read-mode help dialog for My Shortcuts reorder; refresh bottom
  sheet layout, strings, themes, and ThemeManager support.

Made-with: Cursor
- Unify UI strings, toasts, dialogs, content descriptions, and layout
  comments to use Favorites instead of My favorites.
- Profile hub slot labels: uniform autosize (9–11sp, 8–13 for action),
  two lines, tighter padding above bottom strip, simpler line breaks.

Made-with: Cursor
- Use symmetric top/bottom padding around the text area above the strip.
- Profile slots: CENTER_VERTICAL|CENTER_HORIZONTAL, TEXT_ALIGNMENT_GRAVITY,
  and zero first/last baseline-to-edge on P+ so two-line labels sit centered.

Made-with: Cursor
Introduce a Create Shortcut bottom sheet with key chips and preview styling, wire it into shortcut management/reorder flows, and extend key parsing plus tests so custom shortcut combinations can be validated and persisted reliably.

Made-with: Cursor
…ion.

This updates the reorder sheet so Create behaves by tab context and adds a built-in-profile Favorites reset path, with manager support and updated help/copy to make the behavior clear.

Made-with: Cursor
Refine My Shortcuts reorder bottom sheet adapters and layouts for tighter
spacing and clearer hierarchy; align section picker and compact favorite
strip layouts with updated strings and styles.

Made-with: Cursor
…t strip

- Label Win modifier as Super when target OS is Linux (shortcut strings).
- Apply resolveFixedTopLocalFnMapping for top-strip sends so Fn overlays use
  correct key codes and modifier masks with locked modifiers.
- USER_GUIDE: document fixed shortcut strip rows, OS label mapping, and local
  Fn overlays (Tab/Enter on cols 1 and 3).

Made-with: Cursor
- Page 1 local Fn: row2 → Home/End/PgUp/PgDn/Ins/Scr Lk; row3 → Pause,
  slash, backslash, pipe, quotedbl (Shift+'), hyphen; IME slot unchanged.
- Page 2 (Shortcut Hub): Fn off keeps five placeholders + DISPLAY + Fn;
  Fn on shows six placeholders + Fn (DISPLAY hidden); rebuild fixed-top
  panels when Fn toggles.
- Action-label path: more fixed-strip keys use text mode; IME toggle gets
  short strings (KeyMod / Sys IME); Fn overlays prefer mapping labels over
  base icons.
- Add .cursor/plans shortcut-strip-phase2-layout plan; USER_GUIDE aligned.

Made-with: Cursor
Add a page-1 rapid-tap detector for Shift/Ctrl/Alt/Win that shows a long-press lock tip after quick repeated taps, with a 3s window and cooldown to avoid spam.

Made-with: Cursor
Align Page 1 base/Fn-on row mappings to the new modifier-first arrangement and update Shortcut Hub Page 2 symbols for both Fn states, with matching USER_GUIDE documentation.

Made-with: Cursor
Ensure Page 1 local-Fn row-3 BKSP and DEL render with backspace-style icons, and mirror the DEL icon direction for forward-delete behavior in fixed top rows.

Made-with: Cursor
Shrink the alternate-character popup GridLayout to occupied slots only,
update AlternatePopupGeometry and vertical offset, refresh docs and tests,
and add the page2 hub row keys plan.

Made-with: Cursor
Tune cancel/deadzone thresholds, add diagonal-to-vertical fallback for sparse alternate maps, and raise popup placement when bottom-row options exist to keep row-3 choices visible.

Made-with: Cursor
Replace the seven profile cells with Fn-off/F-on symbol grids: two hub
profile slots appear only when local Fn is active, alongside ~'"%^ and
<>*&,. rows. Fn off exposes ()[]:#@ and /\|?-_. Remove Page 2 DISPLAY
and obsolete KEY_HUB_FN_* sentinels. Update USER_GUIDE for the new Hub.

Made-with: Cursor
Page 0 overlay (12345, 67890, +, −, = on DISPLAY) applies when the global
fixed-strip Fn latch is off; when latched, legends and sends stay F1–F12
with DISPLAY as the icon/text mode toggle. Pages 1–2 mapping rule is
unchanged. Document Page 0 behavior in USER_GUIDE and align Key/DISPLAY
comments.

Made-with: Cursor
Improve fixed-row keycap readability with cleaner Fn hint rendering and icon spacing, fix Page 2 local-Fn remap behavior, and make row-1 favorites toggle between shortcut name and chord without duplicate F-key text.

Made-with: Cursor
- mapAsciiAlternate: Unicode-entry options for rupee, won, ruble, lira
- sendAlternateOption: route unicodeCodePoint via HidTextKeystrokeSender
- keyAlternates: eight tokens on d (cardinals + corners) portrait/landscape
- KEYBOARD_ALTERNATES.md: document tokens 5–8 and extended currency
- Fix isCtrlLeftLocked typo in sendAlternateOption

Made-with: Cursor
- Add minimum 40dp cell size so single-glyph alternates stay readable
- Blend primary-container wash for Up/Down/Left/Right idle cells (fixes
  invisible translucent fills on some PopupWindow paths)
- Re-apply alternate pick highlight after popup is shown

Made-with: Cursor
@youyoubilly youyoubilly merged commit e97c341 into main May 1, 2026
1 check failed
@youyoubilly youyoubilly deleted the ux-optimizing branch May 1, 2026 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant