| Summary: | Mac keyboard bindings | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Mihai Sucan <mihai.sucan> |
| Component: | Client | Assignee: | Felipe Heidrich <eclipse.felipe> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | bokowski, eclipse.felipe, mihai.sucan, Mike_Wilson, Silenio_Quarti |
| Version: | 0.2 | ||
| Target Milestone: | 0.2 | ||
| Hardware: | Macintosh | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
|
Description
Mihai Sucan
Pull request submitted: https://github.com/eclipse/orion.client/pull/5 I believe that these shortcuts belong to the TextView, because they are basic/native/standard bindings for Macs. For example Gecko has these keyboard bindings defined here: http://mxr.mozilla.org/mozilla-central/source/content/xbl/builtin/mac/platformHTMLBindings.xml We would like to have this in Orion, so we can keep our integration code minimal. Please let me know if further changes are needed. Thank you! Suggestions for improvements are very much welcome. I think that is good idea. I will try out the patch and hopefully release it this afternoon. Hi Mihai, I tested the changes and I tested also shortcuts in TextEdit, Chrome contentEditable and Firefox contentEditable. Here are my results: page down/page up/text start/text end - scrolling without changing the selection is fine works the same everywhere. emacs key bindings: It seems that Firefox is a bit different than Chrome and TextEdit (and this page too http://www.danrodney.com/mac/). These commands exist in Firefox but don't exist in TextEdit/Chrome w - delete word previous u - delete line start (not working in textview on chrome) These commands exist in TextEdit/Chrome but don't exist in Firefox y - undo kill (yank) l - center current line o - insert line break without moving caret t - transpose These commands are the same: a - line start e - line end f - char next b - char previous (not working in textview on chrome) d - delete next h - delete previous n - line down p - line up v - page down (textview/firefox does not update the caret, others do) k - delete line end (kill) I would personally mirror the bindings from TextEdit as it is, IMO, the best reference for the platform. What do you think ? (In reply to comment #3) > Hi Mihai, > > I tested the changes and I tested also shortcuts in TextEdit, Chrome > contentEditable and Firefox contentEditable. Thank you for looking into the patch and testing it. Please note I wrote it on a Linux PC, with some Mac friends who tested it later. :) > Here are my results: > > page down/page up/text start/text end - scrolling without changing the > selection is fine works the same everywhere. > > emacs key bindings: > > It seems that Firefox is a bit different than Chrome and TextEdit (and this > page too http://www.danrodney.com/mac/). > > These commands exist in Firefox but don't exist in TextEdit/Chrome > w - delete word previous > u - delete line start (not working in textview on chrome) These must be coming from emacs. We'd like them in the patch, since they are in Firefox by default. If you want I can put them behind if (isFirefox). Do you want this? > These commands exist in TextEdit/Chrome but don't exist in Firefox > y - undo kill (yank) > l - center current line > o - insert line break without moving caret > t - transpose True. I did not implement them because Firefox does not implement them natively. Therefore, it was really a matter of giving users the expected Firefox behavior. Nonetheless, your point is correct. Do you want me to implement these shortcuts as well? Or can these be in a separate follow-up bug? (we do not block on these) > I would personally mirror the bindings from TextEdit as it is, IMO, the best > reference for the platform. > > What do you think ? Agreed. This patch brings Orion much closer to TextEdit behavior, with the exception of y/l/o/t. Thanks again! I will release your commit right now (the code is good, I tested it again) and I'll go over the code for a few cosmetic changes. I will change so that u/w are only available on firefox, for non-firefox we should have y/l/o/t available (do you want implement them ?) final notes (I'll work on these two): -find out why command+b is not working on chrome -decide if command-v (page-down) should move the selection -- in firefox answer is no -- other ua the answer is yes (chrome/safari tested) I personally think we should do it (it easy for us). My thinking is that textview should have native behaviour, and that we should use a plain contentEditable on the user-agent as the reference for the "native behaviour". Agreed ? Pushed http://git.eclipse.org/c/e4/org.eclipse.orion.client.git/commit/?id=e18c89ac53c275d11d9bf0b5a462a5ebae4d5c9f I'll keep this bug open till we make all the little changes we have in mind. (In reply to comment #5) > I will release your commit right now (the code is good, I tested it again) and > I'll go over the code for a few cosmetic changes. Sounds great! > I will change so that u/w are only available on firefox, for non-firefox we > should have y/l/o/t available (do you want implement them ?) Agreed. We have a lot of work on our plate for the devtools. I'd very much like to implement them, but I have other priorities now. :( We have some to meet for each Firefox release. > final notes (I'll work on these two): > -find out why command+b is not working on chrome > -decide if command-v (page-down) should move the selection > -- in firefox answer is no > -- other ua the answer is yes (chrome/safari tested) > > > I personally think we should do it (it easy for us). My thinking is that > textview should have native behaviour, and that we should use a plain > contentEditable on the user-agent as the reference for the "native behaviour". > > Agreed ? Agreed. Ultimately it's best to follow the system-native behavior. Given Firefox does things differently ... you can file bugs into our Bugzilla for us to fix our issues. Thank you for the code push! Now I can update our integration code. (correction) (In reply to comment #7) > We have some to meet for ... ... We have some goals to meet for ... (In reply to comment #7) > We have a lot of work on our plate for the devtools. I'd very much like to > implement them, but I have other priorities now. :( We have some to meet for > each Firefox release. That is fine, I'll report a bug for that and if you ever find time to work on this before I do just add a note to the bug so we don't duplicate any efforts. (In reply to comment #9) > (In reply to comment #7) > > We have a lot of work on our plate for the devtools. I'd very much like to > > implement them, but I have other priorities now. :( We have some to meet for > > each Firefox release. > > That is fine, I'll report a bug for that and if you ever find time to work on > this before I do just add a note to the bug so we don't duplicate any efforts. That's fine for me as well. Please CC me to the bug. Thank you! If there's nothing else to do here, you can mark this bug as fixed, then. Agreed, closing bug see bug 351455 for the y/l/o/t keybindings |