I did a fresh install of Fedora 12, and since then I've been having issues with the cursor keys on my laptop. This only happens within GNU Screen. The cursor keys stop working in applications like mutt and vim.
I did some googling and this appears to be an issue with the keyboard being in "Application Mode". I didn't know much about Application Mode so I had to read up on it. I still don't understand much about what it is, but I understand that Screen sends different strings for the cursor keys (as well as the keypad keys, though this does not apply on my laptop keyboard) when in Application Mode. Thus, when this problem occurs my custom keybindings for the cursor keys don't work in mutt, and the cursor keys don't work as expected in vim.
Some more googling and fiddling around and I believe I've narrowed down the issue. This tends to happen when I exit mutt from a window within a GNU Screen session. I've been able to trigger the problem by starting mutt, doing a few actions, and exiting. When I launch mutt again, there's a good chance the cursor bug will pop up. I'd estimate it happens about 1/3 of the time. The longer mutt has been open, the more likely it seems that if I quit and relaunch mutt, the problem will be triggered. According to this page
, "Certain programs put the terminal in application cursor key mode; if you kill them with kill -9, or if they crash, then the mode will not be reset." I aliased echo -e '\033>'
to "fixterm", and after triggering this bug I can detach from my Screen session, run fixterm
, and when I re-attach to my Screen session the cursor keys work again.
Thinking that mutt was exiting improperly or otherwise failing to reset the cursor key mode, I downloaded the source RPM and rebuilt mutt with debug support, then ran mutt with debug level 2 (as suggested on mutt's bug tracker
). I triggered the bug a few times, but not a single error showed up in mutt's debug logs.
I'm seriously at a loss for what is causing this. I do not have this problem on my workstation at work, which is running Fedora 11.