The vty library has always been providing a control-I event when the user pressed tab. (This is a bug IMO) However, due to some details I don't know, a control-I event is translated to the same character as a '\t' event and a change in how Yi processes events could have caused this bug to surface. Observe: UFO:yi coconnor$ ghci Yi/Event.hs [snip] *Yi.Event> eventToChar (Event (KASCII 'i') [MCtrl]) '\t' *Yi.Event> eventToChar (Event (KASCII '\t') []) '\t'
I haven't caught up with the details of the latest changes, but could the event handling of changed along these lines: 1. Vim specified keymap as a map from character codes to actions 2. Yi translated incoming events to characters 3. The action was looked up based on that character. To 1. Vim specified keymap as a map from events to actions. 2. The action was looked up based on the incoming event. -Corey On Sun, Jun 22, 2008 at 10:54 AM, Nicolas Pouillard <[EMAIL PROTECTED]> wrote: > > Excerpts from Corey O'Connor's message of Sun Jun 22 19:09:59 +0200 2008: > > On Sun, Jun 22, 2008 at 6:54 AM, Jean-Philippe Bernardy < > > [EMAIL PROTECTED]> wrote: > > > > > This is probably a bug in the vty library. The problem is that it > > > hardcodes all the terminal-specific stuff; which means it's very > > > > sensitive to the kind of terminal you have. > > > > > > Confirmed. Even in the test program for VTY the event produced is "EvKey > > (KASCII 'i') [MCtrl]". > > > > > Maybe Corey has done some work on it recently? > > > > > > Not on key translation, but it's quite possible I broke it anyways ;-) > > I've just started a trac for vty. The bug is: > > http://trac.haskell.org/vty/ticket/3 > > > > In the meantime we could add a the workaround that > > > (KASCII 'i') [MCtrl] is translated to Tab in Yi.UI.Vty; or bind that > > > event in Vim. > > I've made such a workaround, sent it to you and CCed this list. > > -- > Nicolas Pouillard aka Ertai -- -Corey O'Connor --~--~---------~--~----~------------~-------~--~----~ Yi development mailing list [email protected] http://groups.google.com/group/yi-devel -~----------~----~----~----~------~----~------~--~---
