joouha / euporie

Jupyter notebooks in the terminal
https://euporie.readthedocs.io
MIT License
1.54k stars 36 forks source link

Custom keybindings for `euporie.notebook.tabs.notebook.Notebook` are not detected #107

Closed matheusfillipe closed 2 months ago

matheusfillipe commented 2 months ago

Keybindings customizations work for euporie.core.app.BaseApp but not for euporie.notebook.tabs.notebook.Notebook.

Steps to reproduce

Install euporie with pipx:

pipx install euporie

Create and edit config.json accordingly to documentation setting custom values in euporie.notebook.tabs.notebook.Notebook

{
  "edit_mode": "vi",
  "notebook": {
    "line_numbers": true,
    "run_after_external_edit": false,
    "expand": true,
    "show_cell_borders": true,
    "show_side_bar": true,
    "always_show_tab_bar": false,
    "multiplexer_passthrough": true,
    "color_scheme": "default"
  },
  "key_bindings": {
    "euporie.core.app.BaseApp": {
      "next-tab": "A-]",
      "previous-tab": "A-["
    },
    "euporie.notebook.tabs.notebook.Notebook": {
      "copy-cells": "y",
      "cells-to-code": "c"
    }
  }
}

Outcome

I can switch tabs with Alt-] and Alt-[ but I cannot copy cells with y or convert cells to code with c.

The app menus still show the old shortcuts for these actions: image

But show the new and they are function for the other ones: image