Opened 16 years ago

Closed 16 years ago

#1695 closed New Feature (fixed)

Improving the default hotkey configuration?

Reported by: Martin Kou Owned by: Martin Kou
Priority: Normal Milestone: FCKeditor 2.6
Component: General Version: SVN (FCKeditor) - Retired
Keywords: Review+ Cc:

Description

The following proposals were made from Paul (saul11) in our IRC channel.

  1. Change the Ctrl-Tab hotkey for Source mode to something else (Paul proposed Ctrl-Shift-Tab, or maybe Ctrl-# or Ctrl-$), since Ctrl-Tab is now an often-used hotkey for switching tabs in modern browsers.
  2. Allow the use of Ctrl-T for opening tabs in FCKeditor, the current hotkey configuration blocks Ctrl-T key events from reaching the browser.

These should be trivial changes to fckconfig.js, but careful considerations have to be made about whether they will impact useability of the editor.

Attachments (2)

1695.patch (812 bytes) - added by Martin Kou 16 years ago.
Proposed patch for fixing #1695.
1695_2.patch (1.4 KB) - added by Martin Kou 16 years ago.

Download all attachments as: .zip

Change History (17)

comment:1 Changed 16 years ago by Frederico Caldeira Knabben

We should work on the current list and find any possible browser conflict, and possibly enhance the list of keys to not handle, like CTRL+T.

comment:2 Changed 16 years ago by Martin Kou

I'm sure if this can be fixed:

While I was playing with Mac OS X recently, I noticed that Meta-Left and Meta-Right have overlapped functions assigned to them in Firefox. If you press Meta-Right while there's no next page in the browser history, the hotkey sends the caret to the end of the line (just like the End key in Windows or Linux). But if there is a next page in browser history, then the hotkey would send the browser to the next page. Ditto for Meta-Left.

This is extremely confusing, but I suspect the hotkeys are already being processed by Firefox core so it might be impossible to fix in JavaScript.

comment:3 Changed 16 years ago by Martin Kou

typo in my last post: "I'm *not* sure if this can be fixed"

comment:4 Changed 16 years ago by Martin Kou

In Mac OS X, Meta-# or Meta-$ are used for taking screenshots, Meta-Shift-Tab and Meta-Tab are used for switching between programs. So all of the suggested hotkeys as well as the current hotkey for switching to and from Source mode conflicts with some system function in Mac OS X. (the CTRL part of all FCKeditor hotkeys are automatically changed to Meta in Macs)

comment:5 Changed 16 years ago by Martin Kou

Ctrl-Shift-Tab switches tabs backwards in Firefox in Windows and Linux, so it really gives no improvement over Ctrl-Tab.

comment:6 Changed 16 years ago by Martin Kou

How about this: use the ESC key to "escape" to and from Source mode. I can think of a few favorable reasons for using the ESC key for mode switching:

  1. The ESC key is not bound to any system or browser functions in IE/Firefox/Opera/Safari and Linux/MacOSX/Windows.
  2. The escape metaphor to mode switching makes intuitive sense.
  3. The escape key is not used in other word processing software in editing texts so users would not feel strange that a hotkey he has been using in Word is doing "something else" in FCKeditor.
  4. And finally, ESC does not involve complicated key combinations.

Changed 16 years ago by Martin Kou

Attachment: 1695.patch added

Proposed patch for fixing #1695.

comment:7 Changed 16 years ago by Martin Kou

Keywords: Review? added

comment:8 Changed 16 years ago by Martin Kou

Owner: set to Martin Kou
Status: newassigned

comment:9 Changed 16 years ago by Frederico Caldeira Knabben

Keywords: Review- Discussion added; Review? removed

I think the ESC key is not a good choice yet Martin. This key is always associated to the action of stopping tasks, or closing things. For example, hitting ESC in our dialogs, you close them. This is the expected behavior. It would be strange to use it to switch between views, in the same way that browsers would never use it to perform actions other than stop or close.

The ESC would have some sense only in the source view, because here you have effectively "entered" on it, so you could "escape" from it and return back to the normal mode. The opposite would sound strange. Also, the ESC key gives that sense that things done until now in that mode, will be reverted back (not applied), just like a "Cancel" button.

In the other hand, it seams almost inevitable hitting key combinations used by the browser: IE, Firefox, Safari and Opera.

We could try the CTRL+SHIFT+S, which only in Safari takes and action, opening the save dialog. Actually Safari is ignoring the SHIFT, and just applying CTRL+S, so if we can block the Safari action, that would be ok for us.

The final "fix" would be removing the key combination for Source View... (I don't thing the CTRL+ALT+SHIFT+S solution is really usable).

Let's discuss it further.

comment:10 Changed 16 years ago by Martin Kou

I did some simple experiments by typing on the URL box of Safari the following:

javascript: alert(document.addEventListener('keydown', function(evt){evt.preventDefault();}, false));

And then I pressed Ctrl-Shift-S or Meta-Shift-S.

It blocked the saving dialog on the Mac Safari, but it didn't for the Windows Safari. So The Ctrl-Shift-S solution doesn't work.

comment:11 Changed 16 years ago by Martin Kou

I've tested Ctrl+ and Ctrl+Shift+ today, which resemble the console hotkey in games. Unfortunately the key combo is used in Mac OS X to switch windows, so even that is not a viable key combo for Source mode.

Now I think removing the Source mode hotkey is the way to go.

comment:12 Changed 16 years ago by Martin Kou

Oops... the backquote character doesn't display here since it's a WikiFormatting symbol. What I meant in the last reply was Ctrl+Shift+Backquote and Ctrl+Backquote.

Changed 16 years ago by Martin Kou

Attachment: 1695_2.patch added

comment:13 Changed 16 years ago by Martin Kou

Keywords: Review? added; Review- Discussion removed

With no more comments and sensible hotkey combinations for source mode, I'm proposing a patch to simply remove the source hotkey and fix Ctrl-T in Firefox.

comment:14 Changed 16 years ago by Frederico Caldeira Knabben

Keywords: Review+ added; Review? removed

For now, this would be an acceptable resolution for this problem. A hotkey for the source view is not critical in effect, and can be easily configured by the end developer.

We'll have to put our heads at work in the future, to provide a definitive alternative in this sense, so we can definitely avoid hotkeys collisions.

comment:15 Changed 16 years ago by Martin Kou

Resolution: fixed
Status: assignedclosed

Fixed with [1684].

Click here for more info about our SVN system.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy