Open Bug 1041817 Opened 10 years ago Updated 2 years ago

Custom keyboards and shortcuts

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

34 Branch
x86
macOS
defect

Tracking

()

Tracking Status
firefox34 --- affected

People

(Reporter: ratkke, Unassigned)

Details

(Keywords: testcase, Whiteboard: [key hell])

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36

Steps to reproduce:

I've installed custom keyboard for os x 10.9 Lipton(http://azaitsev.com/wp-content/uploads/2011/09/Lipton.bundle.zip), place it in /Library/Keyboard Layouts/ and than choose "Lipton" in available keyboards in Syst Pref. So, after this, language can be switched by pressing Caps Lock. 


Actual results:

Shortcuts such as cmd+a, cmd+c, cmd+v, cmd+t doesn't work, when Russian language is chosen. 


Expected results:

Than this shortcust will work, because they are working in any program i tried, except firefox.
Masayuki-san, could you have a look? I don't know enough about this area of our codebase to see what's going on here...
Component: Untriaged → Keyboard: Navigation
Flags: needinfo?(masayuki)
Keywords: testcase
Product: Firefox → Core
We don't assume that CapsLock changes keyboard layout and Cmd (+ CapsLock) + foo sends non-ASCII character.

Although, it's possible to conform with like this keyboard layout. However, I don't like to add runtime cost for all users but that is needed by minorities. However, if on other native applications, this keyboard layout works well, we should fix this bug. So, does this keyboard layout work well on other applications? Especially, looks like control + foo don't work since the keyboard layout doesn't have controlled key map nor commanded key map.

However, I guess that <keyMapSelect mapIndex="0"> of Lipton.keylayout should have <modifier keys="command?"/> and <modifier keys="anyShift? command caps?"/>. And also <keyMapSelect mapIndex="1">'s <modifier> should be <modifier keys="anyShift caps?"/>. Then, isn't this bug fixed? (Although, you must need to fix in option cases, though).

So, I believe that this is caused by some mistake of the keyboard layout author and/or some bugs of creator tool.
Flags: needinfo?(masayuki) → needinfo?(ratkke)
Whiteboard: [key hell]
(In reply to Masayuki Nakano (:masayuki) (Mozilla Japan) from comment #2)
> We don't assume that CapsLock changes keyboard layout and Cmd (+ CapsLock) +
> foo sends non-ASCII character.
> 
> Although, it's possible to conform with like this keyboard layout. However,
> I don't like to add runtime cost for all users but that is needed by
> minorities. However, if on other native applications, this keyboard layout
> works well, we should fix this bug. So, does this keyboard layout work well
> on other applications? Especially, looks like control + foo don't work since
> the keyboard layout doesn't have controlled key map nor commanded key map.
> 
> However, I guess that <keyMapSelect mapIndex="0"> of Lipton.keylayout should
> have <modifier keys="command?"/> and <modifier keys="anyShift? command
> caps?"/>. And also <keyMapSelect mapIndex="1">'s <modifier> should be
> <modifier keys="anyShift caps?"/>. Then, isn't this bug fixed? (Although,
> you must need to fix in option cases, though).
> 
> So, I believe that this is caused by some mistake of the keyboard layout
> author and/or some bugs of creator tool.

So, apps with Lipton works: Safari, Chrome, Sublime text, Skype, 1password, airmail, pages/numbers, xcode, adium, alfred, omnifocus. And don't work with Firefox only. 
To be honest, I misunderstand about how to fix layout's settings because of my poor knowledge. I copy/pasted all Lipton's settings to pastebin(http://pastebin.com/HSecy9sB), so can you explain to me again what I need to change to make it works with Firefox?
Flags: needinfo?(ratkke)
(In reply to ratkke from comment #3)
> (In reply to Masayuki Nakano (:masayuki) (Mozilla Japan) from comment #2)
> > We don't assume that CapsLock changes keyboard layout and Cmd (+ CapsLock) +
> > foo sends non-ASCII character.
> > 
> > Although, it's possible to conform with like this keyboard layout. However,
> > I don't like to add runtime cost for all users but that is needed by
> > minorities. However, if on other native applications, this keyboard layout
> > works well, we should fix this bug. So, does this keyboard layout work well
> > on other applications? Especially, looks like control + foo don't work since
> > the keyboard layout doesn't have controlled key map nor commanded key map.
> > 
> > However, I guess that <keyMapSelect mapIndex="0"> of Lipton.keylayout should
> > have <modifier keys="command?"/> and <modifier keys="anyShift? command
> > caps?"/>. And also <keyMapSelect mapIndex="1">'s <modifier> should be
> > <modifier keys="anyShift caps?"/>. Then, isn't this bug fixed? (Although,
> > you must need to fix in option cases, though).
> > 
> > So, I believe that this is caused by some mistake of the keyboard layout
> > author and/or some bugs of creator tool.
> 
> So, apps with Lipton works: Safari, Chrome, Sublime text, Skype, 1password,
> airmail, pages/numbers, xcode, adium, alfred, omnifocus. And don't work with
> Firefox only. 
> To be honest, I misunderstand about how to fix layout's settings because of
> my poor knowledge. I copy/pasted all Lipton's settings to
> pastebin(http://pastebin.com/HSecy9sB), so can you explain to me again what
> I need to change to make it works with Firefox?

Lipton.keylayout which is in the zip file you pointed is an XML file. Looks like the definition doesn't define the cases with Command key and Control key. So, I guess that the keyboard layout definition must not be enough for applications which handles shortcut keys themselves.

So, mapping modifier information to the keyMapSelect element could fix this bug on your side. Anyway, this should be fixed in Gecko side since other applications work with the incomplete keyboard layout definition, though. I don't have much time for working on this now. So, you should fix this bug on your side at least for now.
Marking as confirmed from Comment 4.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Component: Keyboard: Navigation → User events and focus handling
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.