Using arrow keys to do single-pixel nudge transforms fails with hiDPI #67924

Closed
opened 2019-07-30 10:23:44 +02:00 by Sebastian Koenig · 16 comments

System Information
Operating system: Darwin-15.6.0-x86_64-i386-64bit 64 Bits
Graphics card: NVIDIA GeForce GT 750M OpenGL Engine NVIDIA Corporation 4.1 NVIDIA-10.10.14 310.42.25f02

Blender Version
Broken: version: 2.80 (sub 75), branch: master, commit date: 2019-07-24 14:22, hash: 507ffee6e1
Worked: (optional)

Short description of error
Moving an object with the arrow keys has problems when combined with hiDPI. Pressing G and right or up arrows does not move the object, pressing G and left or down arrows does work.

Exact steps for others to reproduce the error

  • Open Blender using a hiDPI display
  • Press G to enter the translate modal operator
  • Press Up or Left arrows
  • Nothing happens
**System Information** Operating system: Darwin-15.6.0-x86_64-i386-64bit 64 Bits Graphics card: NVIDIA GeForce GT 750M OpenGL Engine NVIDIA Corporation 4.1 NVIDIA-10.10.14 310.42.25f02 **Blender Version** Broken: version: 2.80 (sub 75), branch: master, commit date: 2019-07-24 14:22, hash: `507ffee6e1` Worked: (optional) **Short description of error** Moving an object with the arrow keys has problems when combined with hiDPI. Pressing G and right or up arrows does not move the object, pressing G and left or down arrows does work. **Exact steps for others to reproduce the error** - Open Blender using a hiDPI display - Press G to enter the translate modal operator - Press Up or Left arrows - Nothing happens
Author
Member

Added subscriber: @sebastian_k

Added subscriber: @sebastian_k

Added subscriber: @WilliamReynish

Added subscriber: @WilliamReynish

Works fine here on a Danish keyboard which is similar to German. If I set the keyboard to German, it still works.

Works fine here on a Danish keyboard which is similar to German. If I set the keyboard to German, it still works.

Added subscriber: @martin.ackerl

Added subscriber: @martin.ackerl

I have the same problem on my System. After pressing g, with the arrow keys I can move an object to the left and to the bottom but not to the right and up. Navigating in the timeline works fine with all arrow keys. Had the same problem already in 2.79

System Information
Operating system: Darwin-18.6.0-x86_64-i386-64bit 64 Bits
Graphics card: AMD Radeon Pro Vega 64 OpenGL Engine ATI Technologies Inc. 4.1 ATI-2.9.26

Blender Version
Broken: version: 2.81 (sub 1), branch: master, commit date: 2019-08-02 12:42, hash: 38ff5064b3

I have the same problem on my System. After pressing g, with the arrow keys I can move an object to the left and to the bottom but not to the right and up. Navigating in the timeline works fine with all arrow keys. Had the same problem already in 2.79 **System Information** Operating system: Darwin-18.6.0-x86_64-i386-64bit 64 Bits Graphics card: AMD Radeon Pro Vega 64 OpenGL Engine ATI Technologies Inc. 4.1 ATI-2.9.26 **Blender Version** Broken: version: 2.81 (sub 1), branch: master, commit date: 2019-08-02 12:42, hash: `38ff5064b3`

Added subscriber: @jenkm

Added subscriber: @jenkm

It depends on the pixel density of a screen.
If you "Open in Low Resolution", then all keys will work.

The problem seems to be that when divided, the coordinates (integer type) are rounded down,
as a result, the cursor coordinates may decrease (left and down keys) but cannot increase (right and up keys).

void wm_cursor_position_to_ghost(wmWindow *win, int *x, int *y)
{
  float fac = GHOST_GetNativePixelSize(win->ghostwin);

  *x /= fac;
  *y /= fac;
  *y = win->sizey - *y - 1;

  GHOST_ClientToScreen(win->ghostwin, *x, *y, x, y);
}
It depends on the pixel density of a screen. If you "Open in Low Resolution", then all keys will work. The problem seems to be that when divided, the coordinates (integer type) are rounded down, as a result, the cursor coordinates may decrease (left and down keys) but cannot increase (right and up keys). ``` void wm_cursor_position_to_ghost(wmWindow *win, int *x, int *y) { float fac = GHOST_GetNativePixelSize(win->ghostwin); *x /= fac; *y /= fac; *y = win->sizey - *y - 1; GHOST_ClientToScreen(win->ghostwin, *x, *y, x, y); } ```

Thank you @jenkm
I can confirm this on my system.

Thank you @jenkm I can confirm this on my system.

@WilliamReynish can you rename this task, since it doesn't apply to the languages/keyboard but to the screen resolution and cursor coordinates.

@WilliamReynish can you rename this task, since it doesn't apply to the languages/keyboard but to the screen resolution and cursor coordinates.
William Reynish changed title from Arrow keys on a German MacBookPro don't work correctly to Using arrow keys to do single-pixel nudge transforms fails with hiDPI 2020-01-09 13:17:45 +01:00

Changed status from 'Needs Developer To Reproduce' to: 'Confirmed'

Changed status from 'Needs Developer To Reproduce' to: 'Confirmed'

@jenkm: done.

Also, can confirm this issue on hiDPI here also.

@jenkm: done. Also, can confirm this issue on hiDPI here also.
Campbell Barton was assigned by William Reynish 2020-01-09 13:20:16 +01:00

Added subscriber: @ideasman42

Added subscriber: @ideasman42

@ideasman42 feel free to re-assign if necessary. Maybe someone with a hiDPI monitor should better look into this...

@ideasman42 feel free to re-assign if necessary. Maybe someone with a hiDPI monitor should better look into this...
Campbell Barton removed their assignment 2020-02-15 09:25:35 +01:00

This is spesific to macOS since it's the only platform that uses screen DPI to scale cursor coordinates.

Un-assigning as I don't have macOS.

This is spesific to macOS since it's the only platform that uses screen DPI to scale cursor coordinates. Un-assigning as I don't have macOS.

This issue was referenced by ff4ffb18d4

This issue was referenced by ff4ffb18d420852cb20c4c9bb75b6f50277bfcac

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Brecht Van Lommel self-assigned this 2020-02-15 13:45:08 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
7 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#67924
No description provided.