Sending a string with capital letters should not trigger a shift key

RESOLVED FIXED in mozilla49

Status

defect
RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: whimboo, Unassigned)

Tracking

({pi-marionette-userinput})

Trunk
mozilla49
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

As seen today while implementing the logic for opening new browser windows in Firefox, the send_keys() method is broken when capital letters are contained in the string. Here an example:

marionette.%window_element%.send_keys(*[u'\ue009', u'N'])

This is Ctrl+N and should open a new browser window. But sending this combination does nothing, because as Chris told me, the shift key is getting activated internally.

As long as the shift key is not explicitly requested, it should not be used.
This happens quite explicitly here: https://hg.mozilla.org/mozilla-central/annotate/34e2d2bd7ec4/testing/marionette/marionette-sendkeys.js#l205

I re-instated that when working on sendkeys due to the previous behavior, which was similar.
How would a user do `N` without pressing pressing the shift key?
So for the shortcuts Firefox gives us command keys with capital letters, as shown above. If we have to keep the current behavior and I see now why, we may have to force our send_shortcut() method to lowercase the command key. Given that the capitalization of a command key doesn't matter, we should be fine.
The key capitalization, as whimboo points out, doesn't matter for this case. Closing since this is desired behaviour since it is impossible to do `N` without a shift or setting capslock (and that's still `n`).
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → WONTFIX
Btw your fix on bug 1255806 fixed this problem.
Depends on: 1255806
Resolution: WONTFIX → FIXED
Target Milestone: --- → mozilla49
You need to log in before you can comment on or make changes to this bug.