Menu

#61 Specific keybinding

open
nobody
None
5
2010-06-15
2010-06-15
No

I'm using a different key bindings for my application, but it is only loaded when java is called from the same directory where the keybinding file resides.

The problem is that ConsoleReader loads the keybindings as a File and not as a Resource. Currently, it only permits to load a keybinding if the file is in the user home or in the current directory. It does NOT use the classpath.

This problem appears in the line 217, method ConsoleReader(InputStream, Writer, InputStream, Terminal)

The keybinding file should be loaded as the default bindings are loaded:

getClass().getResourceAsStream(System.getProperty("jline.keybindings"))

Discussion

  • Andres Gomez Casanova

    In addition, this line probably is not loadind the default keybinding from the user home

    new File(System.getProperty("user.home",
    ".jlinebindings.properties")).getAbsolutePath()

    it always retrieve the name of the user home, nothing else.

     
  • Rodrigo Rosenfeld Rosas

    Take a look at issue #3090685

     

Log in to post a comment.