Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report changes to screen orientation #4574

Closed
nvaccessAuto opened this issue Oct 25, 2014 · 15 comments
Closed

Report changes to screen orientation #4574

nvaccessAuto opened this issue Oct 25, 2014 · 15 comments

Comments

@nvaccessAuto
Copy link

Reported by surfer0627 on 2014-10-25 17:22
Hi,
This is a trivial issue.
Take Internet Explorer for example.
Sometimes, I press ctrl+alt+arrow, which will rotate my screen. But, I could not reproduce it every time.

== Screen rotation commands:
Press one of the arrow keys while pressing ^ Ctrl+? Alt. The left arrow and right arrow keys will rotate the screen 90 degrees.
The down arrow key will flip the screen upside down.
The up arrow key will return the screen to normal.

I don't know the screen orientation, so I use the following steps to check.

  1. Open the Control Panel, choose Display.
  2. Choose Change display settings.
  3. Look for the Orientation drop down menu, and select the orientation mode I want.

Thanks.

@nvaccessAuto
Copy link
Author

Comment 1 by jteh on 2014-10-26 02:28
These commands are provided by some display drivers. The problem is that they conflict with NVDA's table movement commands. It's probably worth disabling these keys in the display settings to avoid accidents.

One concern with having a shortcut for this is that the user may not actually know if they've flipped their screen, so they won't know to check. If they do know, they can probably see the screen anyway and/or have someone sighted watching. Therefore, can you explain how having such a command would help?

I guess there's a way to retrieve this information from Windows, but I have no idea how.

@nvaccessAuto
Copy link
Author

Comment 2 by surfer0627 on 2014-10-26 09:06
Changes:
Changed title from "Add a shortcut to report screen orientation" to "Shortcut "ctrl+alt+arrow" caused screen rotation"

@nvaccessAuto
Copy link
Author

Comment 3 by jteh on 2014-10-26 10:06
That's not a bug in NVDA. See above; it's something done by your display driver.
Changes:
Added labels: cantfix
State: closed

@nvaccessAuto
Copy link
Author

Comment 4 by blindbhavya on 2014-10-26 11:31
A question if I may ask:
When I had got a computer, and tried Ctrl Alt arrow keys, they navigated through tables, but after some time, when a sighted person saw the screen, the screen orientation had changed.
So, even though Ctrl ALt arrows perform table navigation, they must have changed the screen orientation some time, and FYI, Ctrl ALt arrow keys didn't always change screen orientation, but inconsistently.
ALso, a suggestion:
Instead of adding a shortcut for knowing the screen orientation, would it be possible if NVDA could announce screen orientation as changes are made to it, if possible?
BTW, though this isn't exactly a reason for such a feature, this would be useful when you are playing a prank on with a sighted person! :)
Changes:
Changed title from "Shortcut "ctrl+alt+arrow" caused screen rotation" to "Add a shortcut to report screen orientation"

@nvaccessAuto
Copy link
Author

Comment 5 by blindbhavya on 2014-10-26 11:33
Hi,
'A question if I may ask:
When I had got a computer, and tried Ctrl Alt arrow keys, they navigated through tables, but after some time, when a sighted person saw the screen, the screen orientation had changed.
So, even though Ctrl ALt arrows perform table navigation, they must have changed the screen orientation some time, and FYI, Ctrl ALt arrow keys didn't always change screen orientation, but inconsistently.'
Sorry, I did not read your comment, so this must be a bug with my display driver as well.

@nvaccessAuto
Copy link
Author

Comment 6 by blindbhavya on 2014-10-26 11:34
Changes:
Changed title from "Add a shortcut to report screen orientation" to "Shortcut "ctrl+alt+arrow" caused screen rotation"

@nvaccessAuto
Copy link
Author

Comment 7 by jteh on 2014-10-26 11:59
The table movement commands are only relevant in certain places; e.g. browse mode and Microsoft Word. If you use them elsewhere, they will be passed through to the OS as is. It's also possible the display driver intercepts the keys regardless of whether NVDA handles them.

I think it'd be fair to report screen orientation as it changes, though I'm not actually sure this is possible. Morphing ticket accordingly.
Changes:
Changed title from "Shortcut "ctrl+alt+arrow" caused screen rotation" to "Report changes to screen orientation"
Removed labels: cantfix
State: reopened

@nvaccessAuto
Copy link
Author

Comment 8 by surfer0627 (in reply to comment 3) on 2014-10-26 15:12
Replying to jteh:

That's not a bug in NVDA. See above; it's something done by your display driver.

Sorry, I misunderstand your meaning and change the summary and component.
Here is a short quote message from Microsoft community. But, I could not follow the steps to Disable the Hot Key Feature.

The capability to invert/rotate the display is a feature of graphic card drivers.

Method 1: Disable the Hot Key Feature.

Right click on the desktop> Hit Graphics properties > Hot Keys >Remove or clear the check from the Enable Hot Keys

message from:
http://answers.microsoft.com/en-us/windows/forum/windows_7-desktop/ctrlaltarrowsflipping-my-screen-sideways-and/ed43c561-eef3-4934-b5c9-95a91d62d184

@nvaccessAuto
Copy link
Author

Comment 10 by vgjh2005 on 2014-12-27 16:06
Hi:
Is this a good idea that is Changing the NVDA table browse hotkey from ctrl alt to ctrl window? I often active the global application menu when I press alt key. Thanks!

@nvaccessAuto
Copy link
Author

Comment 12 by nvdakor (in reply to comment 10) on 2014-12-28 07:27
Replying to vgjh2005:

Hi:

Is this a good idea that is Changing the NVDA table browse hotkey from ctrl alt to ctrl window? I often active the global application menu when I press alt key. Thanks!

No. Control+Windows+left and right arrows are used in Windows 10 to switch among virtual desktops.

@josephsl
Copy link
Collaborator

josephsl commented May 3, 2016

Hi,

Coming back to this issue...

Figured it out: you need to look for WM_DISPLAYCHANGE message. In order to determine if this is primary or secondary orientation, we need to use Windows API to retrieve relevant data structure.

Solution algorithm:

  1. Use a custom window and define message processing routine.
  2. Look for WM_DISPLAYCHANGE message.
  3. If x is greater than y, we're in landscape, otherwise portrait.

Use cases:

  1. Tablet orientation: some would use their tablets in portrait mode, and it would be handy to have this announced.
  2. Display driver hotkey: Intel ones do have Control+Alt+arro keys defined to go set screen orientation (you can disable this).

Questions before committing:

  1. Where: where should we define a custom window to handle this event? I was originally going to use touch tracker to look for display change message, but given that this will cover everyone, I thought about using another window or an existing message processing window.
  2. Reporting primary or secondary mode: should we attempt at fetching the needed data structure in order to report primary and secondary modes? This would be most useful for slates (such as Surface Pro 4, Dell Venue 8 and similar devices).

I've assigned "good for new dev" as this is quite trivial to implement and would teach new developers how to process window messages and to think about general versus specialized solutions. Thanks.

@jcsteh
Copy link
Contributor

jcsteh commented May 3, 2016

We already have a message window which uses windowUtils.CustomWindow. We could just use that to listen for these messages. See core.py at around line 249. It doesn't currently have a windowProc method, but I'm happy for one to be added. This does look a bit odd because it's defined in the middle of core.main, but we only do this so we can import windowUtils late.

@surfer0627
Copy link
Contributor

surfer0627 commented Aug 19, 2016

My friend told me a solution to prevent screen rotation.
'''disable the shortcut key'''

  1. Press win+b to move to system tray.
  2. Press down arrow to find your device. (E.G Intel(R) HD)
  3. Press applications key to open menu.
  4. Press down arrow to find "graphic options".
  5. Press down arrow to find "shortcut key".
  6. Choose "disable".

Notes:
I'm not using English interface, maybe, the menu item expressions are incorrect.

If you don't find your device on system tray. Please try the following steps:

  1. Press win+m to move to destop.
  2. Press numpadMultiply to click right mouse button once.
  3. Press down arrow to find "graphic options".
  4. Press down arrow to find "shortcut key".
  5. Choose "disable".

@josephsl
Copy link
Collaborator

Hi,

For PR writers: Enhanced Touch Gestures add-on has a basic implementation for this feature. As noted in #4612, I recommend combining custom window issues into a PR package (preferably separate commits for each issue). Thanks.

@derekriemer
Copy link
Collaborator

@jcsteh, or someone with committer rights, can you make this b e blocked by #64612 and #6320

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants