Skip to content

Normalize touch X coordinates so left taps navigate to previous page#32

Merged
aSbiEL0 merged 2 commits intomainfrom
codex/fix-left-side-touch-functionality
Mar 1, 2026
Merged

Normalize touch X coordinates so left taps navigate to previous page#32
aSbiEL0 merged 2 commits intomainfrom
codex/fix-left-side-touch-functionality

Conversation

@Codex
Copy link
Copy Markdown
Contributor

@Codex Codex AI commented Mar 1, 2026

Left-side taps were interpreted as “next” because absolute touch coordinates started above zero; navigation should treat the screen midpoint as the divider.

  • Touch width parsing now returns both width and minimum X to normalize device coordinates before tap handling.
  • Tap handling clamps and offsets X values against the detected minimum, ensuring midpoint comparison is accurate for PREV vs NEXT.
  • Initial touch state uses the normalized center to avoid bias toward the right side.

Example:

device_touch_width, device_touch_min = detect_touch_width(device, touch_width)
relative_x = max(0, min(tap_x - device_touch_min, device_touch_width - 1))
cmd_q.put("PREV" if relative_x < (device_touch_width // 2) else "NEXT")
Original prompt

This section details on the original issue you should resolve

<issue_title>Touch left side of screen - script to display previous page</issue_title>
<issue_description>STILL NOT WORKING AT ALL, IT DISPLAYS THE NEXT PAGE SAME AS RIGHT SIDE! #2 </issue_description>

Comments on the Issue (you are @codex[agent] in this section)

@Codex Codex AI changed the title [WIP] Fix script to display previous page on left screen touch Normalize touch X coordinates so left taps navigate to previous page Mar 1, 2026
@aSbiEL0 aSbiEL0 marked this pull request as ready for review March 1, 2026 06:39
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@aSbiEL0 aSbiEL0 merged commit b5c885b into main Mar 1, 2026
@aSbiEL0 aSbiEL0 deleted the codex/fix-left-side-touch-functionality branch March 1, 2026 17:54
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.

Touch left side of screen - script to display previous page

2 participants