US English keyboard users will be confused. "ctrl+a" and "ctrl+A"
will be different shortcuts because all of the modifiers used to
produce the character are hidden and embedded in the char itself.
(define-key python-mode-map (kbd "C-c n") 'nose-trace)(define-key python-mode-map (kbd "C-c N") 'nosetests)On Oct 10, 2015, at 16:55, Scott Sanderson <ssand...@quantopian.com> wrote:US English keyboard users will be confused. "ctrl+a" and "ctrl+A"
will be different shortcuts because all of the modifiers used to
produce the character are hidden and embedded in the char itself.This doesn't seem like especially confusing or surprising behavior. This is more or less how Emacs handles keybindings, for example. Modifier keys (CTRL, META, and SUPER) are written as prefixes, but the main key itself is case-sensitive, and SHIFT is not considered a modifier key.For example, I have separate bindings in Python mode for "CTRL-c followed by lower-case n" and "CTRL-c followed by upper-case N":(define-key python-mode-map (kbd "C-c n") 'nose-trace)(define-key python-mode-map (kbd "C-c N") 'nosetests)My vote would be for option 2.
I’m also curious of what "assume US English layout” mean, in case where the physical mapping of the keyboard cannot match.US UK and FR keyboard are for example **Physically** different in position and number of keys, so I’m not sure of what this would mean.
--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CAPc_zRUeLtTkue9wi_XeFtiwEiKmj%2BKWpwubU0An2BVS%2BR3_8A%40mail.gmail.com.
Keypress is deprecated in DOM 3 and also has some other cross browser issues. Keydown is the way to go.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CAH4pYpT_m%2BPMLeGAWgGmM_9TYn-Mt9nzdyWfCYLhu8RMxPbgTA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CAH4pYpThsi2-UM13kZVu6p-eTW5U8k93N59gHOho1N6jqYPNfw%40mail.gmail.com.
So, the experiments with the `.key` attribute ended up being a failure. The browsers which do implement it, do so incorrectly and inconsistently across browsers and platforms (event amongst themselves). It's quite disappointing.Our current thinking is to continue to use the original `.keyCode` approach and provide default support for US-English keyboards. The keymap manager will take an optional key code map which will map from `keyCode` to "key cap"* and vice-versa. This mapping will necessarily be specific to the browser, platform, and keyboard layout.We will make it simple to provide these mappings as plugins, so the user can configure the keymappings according to their particular configuration. We will rely on the community to generate these mappings for the various OS/browser/layout combinations, but we will provide a graphical tool to help with the generation.* The "key cap" is the primary character printed on a physical keyboard key.
--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/DA8A24C3-D5D4-4318-B307-7C103FAF2982%40gmail.com.