Re: /bind bug

Wouter Coekaerts <[email protected]> Fri, 24 Aug 2007 22:24:24 +0200
Newsgroups gmane.network.irc.irssi.user
Message-ID <[email protected]>
On Friday 24 August 2007 14:09, The Unforgiven wrote:
> basically i am wondering why the following doesn't work
> /bind ^M previous_window
> /save
> /reload

I think you cannot rebind ^M because it is the same as enter. It's probably 
converted to enter even before binds are checked (haven't actually checked 
it, but that's my guess). So if you would be able to rebind ^M, your enter 
key probably wouldn't work anymore ;)

If you want to see "proof" it's the same, you can for example do (on one line)
/script exec -permanent use Data::Dumper; Irssi::signal_add("gui key pressed", 
sub { print $_[0]; } );
That'll print the key codes of all keys you press. And here both enter, and ^M 
just print "10".

> and why after this ^P still works.
> /bind -delete ^P
> /save
> /reload

That's a different thing. ^P is a default binding, and you cannot remove a 
default binding just by doing /bind -delete (you could argue it should work, 
but well, it doesn't). If you really want to remove a binding, as /help bind 
says, you can do "/bind ^P nothing"

Wouter.