Message9561

Author zyasoft
Recipients pekka.klarck, zyasoft
Date 2015-02-25.14:02:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1424872944.78.0.334714411921.issue2276@psf.upfronthosting.co.za>
In-reply-to
Content
I found a workaround with a little experimentation. Create a file %USERPROFILE%\.inputrc and put the desired key binding in:

"\C-z": "\C-d"

Presumably we can create this key binding programmatically in JLine2, using http://jline.github.io/jline2/apidocs/reference/jline/console/KeyMap.html, specifically http://jline.github.io/jline2/apidocs/reference/jline/console/KeyMap.html#bindIfNotBound(java.lang.CharSequence, java.lang.Object), so as to not override user intent.

With my workaround defined, I attempted to look up how JLine2 actually sets things up by examining the key map in use by starting with the ConsoleReader as set with sys._jy_console.reader (defined if using JLine2, otherwise an AttributeError). As usual for such experiments, I use the Jython console itself. However sys._jy_console.reader.keys.getBound("\z") returned jline.console.Operation.SELF_INSERT - no difference from not setting .inputrc - so looks there's some additional work to figure out what's going on here. As usual, this will require reading JLine2 source - that's really the only docs available.
History
Date User Action Args
2015-02-25 14:02:24zyasoftsetmessageid: <1424872944.78.0.334714411921.issue2276@psf.upfronthosting.co.za>
2015-02-25 14:02:24zyasoftsetrecipients: + zyasoft, pekka.klarck
2015-02-25 14:02:24zyasoftlinkissue2276 messages
2015-02-25 14:02:23zyasoftcreate