Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brick visibility demo - ctrl-arrow up/down #6

Closed
dylanmc opened this issue Aug 10, 2015 · 8 comments
Closed

Brick visibility demo - ctrl-arrow up/down #6

dylanmc opened this issue Aug 10, 2015 · 8 comments

Comments

@dylanmc
Copy link

dylanmc commented Aug 10, 2015

The top-left and top-right viewports work as advertised. The bottom one does as expected for left-right movements, but ctrl-up/down arrows affect the top-left viewport instead of the bottom one.

brick version 0.1
vty-5.2.10 (as reported in my cabal sandbox's share/x86_64-osx-ghc-7.10.2 directory)

unsure where the output of cabal freeze goes.

@jtdaugherty
Copy link
Owner

This might be because your terminal emulator isn't sending the same keycodes that Vty expects. Which emulator are you using? (And are you using screen or tmux?)

@jtdaugherty
Copy link
Owner

(And cabal freeze writes cabal.config.)

@jtdaugherty
Copy link
Owner

I tried this using Terminal.app and I saw the same behavior that you described. I always use iTerm2, though, and it works as expected there.

@jtdaugherty
Copy link
Owner

It is possible to tell Terminal.app which escape sequences to send for certain keys. You might consider this:

http://unix.stackexchange.com/questions/110022/how-do-i-find-out-the-keycodes-for-ctrlup-and-down-arrow-for-term-screen

@jtdaugherty
Copy link
Owner

I was able to get this to work by setting sequences for Ctrl-up/down as follows:

  • Go to terminal preferences
  • Click "Keyboard" for active profile
  • Click "+"
  • Select "Control" and "Cursor Up"
  • For the sequence, click the text box, and press ESC [ 1 ; 5 A
    (Similarly for Ctrl-Down, just B instead of A)

@jtdaugherty
Copy link
Owner

(But for future reference, Terminal.app tends to be more impoverished than iTerm2.)

@jtdaugherty
Copy link
Owner

Give this a try and if it works, please close this ticket (or let me know what else I need to do).

@dylanmc
Copy link
Author

dylanmc commented Aug 10, 2015

That workaround (/fix to Terminal) works great. Thanks! (/me shuffles off to download iTerm2)

@dylanmc dylanmc closed this as completed Aug 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants