Skip to content
TheChatArchiveThe Chat Archive
grok-3-mini-beta· xAIHugging Face LMArena Human Preference 140K

is it maybe that the previous proposal was scaling, but acutally only the coordinate…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with chatgpt-4o-latest-20250326’s answer.
  1. User

    is it maybe that the previous proposal was scaling, but acutally only the coordinate system changes?

  2. Assistant

    Yes, you're onto something important here. Let me break this down step by step to address your concern. The issue might indeed stem from the fact that our previous calibration matrices were incorporating scaling based on the screen's aspect ratio (e.g., 16:9 for 1920x1080), but in some cases, you might only need to transform the coordinate system without additional scaling. This could make the touchscreen feel "off" if the scaling is overcorrecting or not aligning with how your device handles input.

    Quick Explanation:

    • Coordinate System Change vs. Scaling:
      • When you rotate the screen (e.g., 90°), the coordinate system for the display changes: what was the X-axis (horizontal) becomes the Y-axis, and vice versa. The calibration matrix in Sway is designed to remap touchscreen coordinates to match this new system.
      • However, for non-square screens (like 1920x1080), we often add scaling factors (e.g., 1.78 for 16:9) to account for the aspect ratio, ensuring that touches map accurately across the entire rotated screen. If your touchscreen driver or hardware already handles some of this internally, adding extra scaling could make things feel distorted or "odd."
      • If the problem persists, it might be that your device only needs a basic rotation of the coordinate system (e.g., swapping axes) without the aspect ratio adjustments. This is worth testing!

    What to Try:

    Let's simplify the calibration matrices to focus only on rotating the coordinate system, without the scaling factors. This means we'll use matrices that just swap and invert axes as needed, based on standard rotations.

    Here's the updated set of keybindings for your Sway config. These use non-scaled matrices, so they should only change the coordinate system without adjusting for aspect ratio.

    Replace <TOUCHSCREEN> and <OUTPUT> as before (using swaymsg -t get_inputs and swaymsg -t get_outputs).

    # ─── Normal Orientation ───
    bindsym $mod+Shift+o exec swaymsg output "<OUTPUT>" transform normal \
      && swaymsg input "<TOUCHSCREEN>" calibration_matrix 1 0 0 0 1 0 0 0 1
    
    # ─── Rotate 90° Left ───
    # Only coordinate system change (no scaling)
    bindsym $mod+Shift+l exec swaymsg output "<OUTPUT>" transform 90 \
      && swaymsg input "<TOUCHSCREEN>" calibration_matrix 0 -1 1 1 0 0 0 0 1
    
    # ─── Rotate 270° Right ───
    # Only coordinate system change (no scaling)
    bindsym $mod+Shift+r exec swaymsg output "<OUTPUT>" transform 270 \
      && swaymsg input "<TOUCHSCREEN>" calibration_matrix 0 1 0 -1 0 1 0 0 1
    
    # ─── Inverted Orientation ───
    bindsym $mod+Shift+i exec swaymsg output "<OUTPUT>" transform 180 \
      && swaymsg input "<TOUCHSCREEN>" calibration_matrix -1 0 1 0 -1 1 0 0 1
    

    Why This Might Work Better:

    • For 90° Left: The matrix 0 -1 1 1 0 0 0 0 1 simply swaps the X and Y axes and inverts one, without scaling. This assumes your touchscreen's driver is already aware of the screen's aspect ratio.
    • Potential Drawback: If your screen is widescreen (1920x1080), touches might still feel slightly misaligned vertically or horizontally because the aspect ratio isn't being compensated. But if this feels "better" or more natural, it's a good sign that scaling was the culprit.
    • Testing Tip: After applying this, rotate your screen and test touches in different areas (e.g., corners, edges, center). If it's still off, we can iteratively add back small scaling adjustments.

    Next Steps:

    1. Update and Test: Paste the above into your config, reload Sway with $mod+Shift+c, and try the rotations. Compare how it feels to the previous version.
    2. If It's Still Not Right: We can fine-tune by adding back partial scaling. For example, for 90° left, try a matrix like 0 -1.5 1 0.7 0 0 0 0 1 (a compromise between no scaling and full 16:9 scaling).
    3. Debugging Tools: To get more insight:
      • Run libinput debug-events while testing touches to see raw input coordinates.
      • Or use wev (if installed via sudo apt install wev) to visualize events on the screen.

    Let me know how this goes or if you'd like me to suggest more tweaks based on your results! 😊

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.