Menu

#32 Keyboard Shortcuts

open
nobody
5
2020-10-21
2008-03-05
Anonymous
No

Hi Mr. Auroux,
your software is great for making annotations to research papers I study. Thanks :-)
However, I would like to configure the keyboard shortcuts, as I always stumble upon pressing ctrl+left, if I edit a textbox and want to jump a word back. Xournal then goes a page back :-(.
Regards
F. Endres

Discussion

  • Denis Auroux

    Denis Auroux - 2008-03-08

    Logged In: YES
    user_id=1482965
    Originator: NO

    I guess it's a reasonable request. It requires switching the interface handling to libglade. In the meantime you can modify the key bindings (menu accelerators) by modifying the source, or more easily by editing the menus in glade-2 ("glade-2 xournal.glade" in the main directory), recompiling and reinstalling. Probably not for novice users though, especially since glade-2 isn't 100% reliable.

    Denis

     
  • Denis Auroux

    Denis Auroux - 2009-10-03

    The shortcuts are still not configurable, but Control+Left/Right are disabled during text edition in version 0.4.5 just released.
    Denis

     
  • Dr.Beco

    Dr.Beco - 2020-10-21

    Thanks for this suggestion.

    I was about to create a new ticket, but I found this one.

    I would very much like the possibility of creating a custom shortcut. I usually work with right hand on pen and left hand on CONTROL-Z, and it would be great if I could change pen, color, select (R like GIMP) etc., only with a single letter (located on the left side of the keyboard).

    My best.

     
    • Denis Auroux

      Denis Auroux - 2020-10-21

      So, obviously this never happened. The only way you can change shortcuts
      right now is by recompiling a custom version of xournal with your
      favorite shortcuts. This happens in src/xo-interface.c
      Search for "gtk_widget_add_accelerator" to find the various lines where
      the keyboard shortcuts are set up and modify them if needed.
      For example, to change the shortcut for the pen tool, find the line

      gtk_widget_add_accelerator (toolsPen, "activate", accel_group,
      GDK_P, (GdkModifierType) GDK_CONTROL_MASK | GDK_SHIFT_MASK,
      GTK_ACCEL_VISIBLE);

      and if you want it to become just "P" instead of Ctrl+Shift+P, change
      the second line to:
      GDK_P, (GdkModifierType) 0,

      or change GDK_P to GDK_W if you want the letter to be "W" instead of
      "P", and so on.

      Then recompile and reinstall.

      Denis

       
      👍
      1

Log in to post a comment.