Profanity: Alt+Left / Alt+Right no longer working

Created on 18 Mar 2015  路  22Comments  路  Source: profanity-im/profanity

I just did a fresh clone and re-compile and the Alt+Left and Alt+Right controls are no longer working.

Arch Linux w/ 3.18.5-x86-64 kernel
Inside a screen session

When I try Alt+Left it just inserts "OD" text into my message editor
When I try Alt+Right it inserts "OC"

Thanks!

bug medium

Most helpful comment

I had the same problem, but on OS X. Fixed it by adding this to ~/.inputrc:

$if profanity
"\e\eOD": prof_win_prev
"\e\eOC": prof_win_next
$endif

All 22 comments

If you could run the following in your terminal:

od -c

And then enter alt-left, enter, alt-right, and let me know the output, I can add the bindings. Also which terminal are you using?

^[^[[D
^[^[[C

I am running urxvt

Should be fixed in master. I tried on rxvt and noticed some other missing keybindings which I've also added:

PageUp/PageDown - Scroll main window
Alt-PageUp/Alt-PageDown - Scroll roster/occupants panel

Let me know if it works for you.

Thanks.

Just updated to Version 0.4.7dev.master.8e80a8c and it is still not working. Did I miss something?

This is the version info you see on start up? If so then I don't think you're missing anything, I'll have to look deeper.

I am running rxvt-unicode on Ubuntu at the moment without screen, so I might need to recreate your environment and try again.

That is the version information at start up, yes. I should mention that I am SSHing from ArchLinux into a screen session on a Debian VPS with rxvt-unicode. I'll try a couple things soon and see if I can't find anything else out.

Ok, thanks for helping out.

The good thing is the key bindings are now working in a basic environment with rxvt which wasn't the case before. The only thing I can think of is that something else has these keys bound which is taking precedence over profanity, but I could be wrong. Let me know if you find anything useful.

This appears to only happen now within screen. If I just SSH in without screen it works fine.

Screen version 4.01.00devel (GNU) 2-May-06

Any ideas? I saw a similar issue #368 that I commented on it working at one point

I guess if you're still seeing the OD, OC then profanity is receiving the escape sequence and nothing is overriding it, which suggests it is a bug of mine.

One other thing you could try, if you have time. Check out the 0.4.6 tag (or whatever was working before), rebuild and see if you still have the problem. If it works, it suggests it is the recent Readline changes that have broken it. If it doesn't, it could be something different in your environment to when it was working before.

Functionality is restored at 0.4.2 / 6e2300419675d9aeca2d4199dc141c17377f9d7b

I can confirm that alt-left/right work as expected under the below situations:

  • Bash
  • Screen Only
  • Screened over SSH

Ubuntu 14.04.2 LTS 3.13.0-52-generic
Screen version 4.01.00devel (GNU) 2-May-06
Profanity, version 0.4.7dev.master.86acd46

@jesseadams - With the recent changes would you mind checking again ?

@PMaynard - It still does not work. With or without screen.

GNU bash, version 4.2.37(1)-release (i486-pc-linux-gnu)
debian_version 7.8
Linux 3.18.5-x86-linode70 #1 SMP Thu Feb 5 12:10:41 EST 2015 i686 GNU/Linux
Profanity Version 0.4.7dev.HEAD.86acd46
Screen version 4.01.00devel (GNU) 2-May-06

@jesseadams - I'm trying to recreate your issue and so far have been unsuccessful, with and without screen using the below specifications. The only difference in test system AFAIK is my kernel version which is older.

Did you do a pull on to existing code or a fresh git clone? it might be worth testing a fresh clone.
What key locals are you using, I could be way off the mark here, but maybe check that everything is matching? e.g. UTF-8 and en-gb.

GNU bash, version 4.2.37(1)-release (i486-pc-linux-gnu)
Debian GNU/Linux 7.8 (wheezy)
Linux x86 3.2.0-4-686-pae
Profanity version 0.4.7dev.master.815ca16 (With pull from #582)
Screen version 4.01.00devel (GNU) 2-May-06

If you have the time, could you verify (again) the output of performing the following in the environment you're running profanity in:

od -c

alt-left, enter, alt-right, and paste the output here?

Secondly I've created a temporary branch in which profanity will output the value of every character it receives. The branch is called print-codes. If you could build this version and test it, and see what the output is, it might also help. If you see nothing in profanity when doing alt-left/right it may be that something (terminal, or screen) is configured to use the key combination, so they are not passed to stdin for profanity.

Just a theory though, be interested to see any results.

I am experiencing the same (FreeBSD 10.2 and git build) using konsole.

^[^[[D
^[^[[C

Chiming in here, but I don't know if it is related. Using profanity 0.4.6 I can use the Alt+Left and Alt+Right key bindings, but the regular readline key bindings like Meta+B and Meta+F won't move the cursor. (#474 explicitly mentions those two)

Should I file a new issue?

The readline bindings are not available in 0.4.6, GNU Readline was added in 0.4.7.

0.4.6 contains some manually implemented bindings, but using Ctrl rather than Meta key.

Hello,
I'm also experiencing troubles using alt key on profanity on urxvt (on Archlinux, with i3 windows manager).
I know this thread is kind of old but the bug don't seem to be fixed.
I precise that the alt key works in other TUI programs like weechat. I don't know anything about keys binding or all the theory behind these stuff, but maybe this piece of information can help.
Thanks.

I had the same problem, but on OS X. Fixed it by adding this to ~/.inputrc:

$if profanity
"\e\eOD": prof_win_prev
"\e\eOC": prof_win_next
$endif

@yumitsu fix works for me (Archlinux / urxvt + tmux)

In yakuake + tmux + fish I can switch profanity-windows with Alt+Left/Right. Has this issue been fixed / can it be closed?

Works for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wstrm picture wstrm  路  6Comments

SteveGZr picture SteveGZr  路  9Comments

marsch- picture marsch-  路  4Comments

eduncan911 picture eduncan911  路  7Comments

moppman picture moppman  路  3Comments