New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many Keybindings don't work on international keyboards. #8586

Closed
AKuederle opened this Issue Jun 27, 2015 · 6 comments

Comments

Projects
None yet
3 participants
@AKuederle

AKuederle commented Jun 27, 2015

Many keybindings will only work on a US-keyboard layout.
Therefore, it would be nice to be able to change the shortcuts.

@Carreau

This comment has been minimized.

Show comment
Hide comment
@Carreau

Carreau Jun 27, 2015

Member

Hi,

Duplicate of many issues, we are aware, it is possible to change shortcut, though we are cornerd by some technicality web browser implementation that do not allow to distinguish keyboard layout, and even distinguish keys on keyboard layout.

Example of remap :

IPython.keyboard_manager.command_shortcuts.remove_shortcut('Shift-k')
IPython.keyboard_manager.command_shortcuts.add_shortcut('Cmd-minus','ipython.move-selected-cell-up')

Problem is on some layout in browser you will get the same event for minus and star, so there is sometime nothing we can do.

Member

Carreau commented Jun 27, 2015

Hi,

Duplicate of many issues, we are aware, it is possible to change shortcut, though we are cornerd by some technicality web browser implementation that do not allow to distinguish keyboard layout, and even distinguish keys on keyboard layout.

Example of remap :

IPython.keyboard_manager.command_shortcuts.remove_shortcut('Shift-k')
IPython.keyboard_manager.command_shortcuts.add_shortcut('Cmd-minus','ipython.move-selected-cell-up')

Problem is on some layout in browser you will get the same event for minus and star, so there is sometime nothing we can do.

@Carreau Carreau closed this Jun 27, 2015

@AKuederle

This comment has been minimized.

Show comment
Hide comment
@AKuederle

AKuederle Jun 27, 2015

Thanks for the fast reply. Sorry for the duplication. Couldn't find a solution during my quick research. Are these options documented somewhere?

AKuederle commented Jun 27, 2015

Thanks for the fast reply. Sorry for the duplication. Couldn't find a solution during my quick research. Are these options documented somewhere?

@Carreau

This comment has been minimized.

Show comment
Hide comment
@Carreau

Carreau Jun 27, 2015

Member

Thanks for the fast reply. Sorry for the duplication

No problem, that what we are here for, even if don't always do a good job.

Couldn't find a solution during my quick research. Are these options documented somewhere?

Not well, we haven't (yet) found a nice way to get docs. I'm trying on my own to write some narrative docs on how to do theses things, but right now it's still mostly read the source.

We are looking for people that would like to help with that, and will hopefully will find someone.

We will be also giving a tutorial, with online material at scipy in a couple of weeks, which deals, in part, with that.

You can also have a look at https://github.com/ipython-contrib/IPython-notebook-extensions that provide some custom keybindings for german keyboard.

Member

Carreau commented Jun 27, 2015

Thanks for the fast reply. Sorry for the duplication

No problem, that what we are here for, even if don't always do a good job.

Couldn't find a solution during my quick research. Are these options documented somewhere?

Not well, we haven't (yet) found a nice way to get docs. I'm trying on my own to write some narrative docs on how to do theses things, but right now it's still mostly read the source.

We are looking for people that would like to help with that, and will hopefully will find someone.

We will be also giving a tutorial, with online material at scipy in a couple of weeks, which deals, in part, with that.

You can also have a look at https://github.com/ipython-contrib/IPython-notebook-extensions that provide some custom keybindings for german keyboard.

@AKuederle

This comment has been minimized.

Show comment
Hide comment
@AKuederle

AKuederle Jun 28, 2015

Thanks again! You pointed me in the write direction. I manged to customize my keybindings as desired and even to write down some kind of "documentation" about what I did: http://akuederle.com/customize-ipython-keymap/

AKuederle commented Jun 28, 2015

Thanks again! You pointed me in the write direction. I manged to customize my keybindings as desired and even to write down some kind of "documentation" about what I did: http://akuederle.com/customize-ipython-keymap/

@Carreau

This comment has been minimized.

Show comment
Hide comment
@Carreau

Carreau Jun 28, 2015

Member

Great ! Is the raw file public, I might send a few precision. Like the handler should not refer to the IPython global, but is passed an env that have references to things.

 handler : function (env) {
        var cm=env.notebook.get_selected_cell().code_mirror;
        ...
    }

The global will* go away. I'll read with more care and comment.

Member

Carreau commented Jun 28, 2015

Great ! Is the raw file public, I might send a few precision. Like the handler should not refer to the IPython global, but is passed an env that have references to things.

 handler : function (env) {
        var cm=env.notebook.get_selected_cell().code_mirror;
        ...
    }

The global will* go away. I'll read with more care and comment.

@AKuederle

This comment has been minimized.

Show comment
Hide comment
@AKuederle

AKuederle Jun 28, 2015

The raw file is public (https://github.com/AKuederle/AKuederle.github.io/blob/master/quicktips/_posts/27-06-2015-Change-IPython-keyboard-shortcuts.md). You can create a pull-request or just comment somewhere. What ever works best for you! Looking forward to your comments

AKuederle commented Jun 28, 2015

The raw file is public (https://github.com/AKuederle/AKuederle.github.io/blob/master/quicktips/_posts/27-06-2015-Change-IPython-keyboard-shortcuts.md). You can create a pull-request or just comment somewhere. What ever works best for you! Looking forward to your comments

@minrk minrk added this to the no action milestone Aug 11, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment