LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-26-2009, 07:06 AM   #1
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561

Rep: Reputation: 57
screen / screenrc: how to use the right / ctrl arrow to go left and right in windows?


IT s impossible to use :
shift + right arrow for next
shift + left arrow for prev
that s my goal



Code:
 cat >/dev/null
^[[D^[[D^[[F^[[F^[[5~^[[5~^[[6~^[[6~^[[5~^[[5~^[[1;2C^[[1;2C^[[1;2C^[[1;2C^[[1;2C^[[1;2C^[[1;2C^[[1;2C^[[1;2C^[[1;2D^[[1;2D^[[1;2C^[[1;2C



^[[1;2C

this is my shift right and left

^[[1;2D



^[[1;2C^[[1;2D^[[1;2D^[[1;2D^[[1;2C^[[1;2C^[[1;2C


^[[1;2C^[[1;2C^[[1;2D^[[1;2D^[[1;2C^[[1;2C^[^[^[[1;5D

this is my ctrl right and left
^[[1;5D^[[1;5C^[[1;5C^[[1;5D^[[1;5D^[[1;5C^[[1;5C^[[1;5D^[[1;5C^[[1;5C^[[1;5C^[[1;5C^[[1;5D^[[1;5D^[[1;5D^[[1;5D^[[1;5C^[[1;5C


^[[1;2C^[[1;2C^[[1;2D^[[1;2C^[[1;5C^[[1;5C^[[1;5D^[[1;5D^[[1;5C
my .screenrc looks like this, but not working. only f1 and f2 work.

Code:
cat  .screenrc
hardstatus alwayslastline "%c %w"

bindkey -k k2 next
bindkey -k k1 prev


bindkey -m "^[[5;2~" stuff ^u

bindkey -m "^[[6;2~" stuff ^d

bind "^[[1;2D" prev
bind "^[[1;2C" next


bindkey "^[1C" next
bindkey "^[1D" prev
--
i use xterm always, everywhre, xterm forever

Last edited by frenchn00b; 10-26-2009 at 07:17 AM.
 
Old 10-26-2009, 07:23 AM   #2
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561

Original Poster
Rep: Reputation: 57
SOLVED

it works with xterm
so i put below an example with all possible configurations for helping.

Code:
 $ cat .screenrc
hardstatus alwayslastline "%c %w"

bindkey -k k2 next
bindkey -k k1 prev

# for shift UP and DOWN arrows
bindkey ^[[1;5A prev
bindkey ^[[1;5B next

# for ctrl right and left arrows
bindkey ^[[1;5D prev
bindkey ^[[1;5C next


 # for shift right and left arrows
bindkey ^[[1;2D prev
bindkey ^[[1;2C next
 
Old 11-03-2009, 10:19 AM   #3
san.doz
LQ Newbie
 
Registered: Feb 2008
Posts: 3

Rep: Reputation: 1
Thanks for your thread frenchn00b, it helped me a lot.

For the people who use *gnome-terminal* like me and want to use

Alt-Left and
Alt-Right

to switch between screen windows, because they have Ctrl-Left/Right assined for switching between gnome-terminal tabs,

use the following in your .screenrc

bindkey ^[O3D prev
bindkey ^[O3C next

Hint: To figure out what strings your key combination gives use the cat-devnull-command mentioned by frenchn00b inside screen and not just inside your terminal. This is not always the same.

sandoz

Last edited by san.doz; 11-03-2009 at 10:21 AM.
 
Old 11-03-2009, 10:36 AM   #4
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561

Original Poster
Rep: Reputation: 57
Quote:
Originally Posted by san.doz View Post
Thanks for your thread frenchn00b, it helped me a lot.

For the people who use *gnome-terminal* like me and want to use

Alt-Left and
Alt-Right

to switch between screen windows, because they have Ctrl-Left/Right assined for switching between gnome-terminal tabs,

use the following in your .screenrc

bindkey ^[O3D prev
bindkey ^[O3C next

Hint: To figure out what strings your key combination gives use the cat-devnull-command mentioned by frenchn00b inside screen and not just inside your terminal. This is not always the same.

sandoz

I would like to reproduce the konsole:

ctrl shift N creates a new shell window.
are you interested?
 
Old 11-04-2009, 03:06 AM   #5
san.doz
LQ Newbie
 
Registered: Feb 2008
Posts: 3

Rep: Reputation: 1
I don't know if I get your question right?

*gnome-terminal* does open a new shell window on Ctrl-Shift-N
*xterm* does not as far as I see.

And in xterm I don't see a difference between Ctrl-N and Ctrl-Shift-N

So far,
sandoz
 
Old 11-06-2009, 01:03 PM   #6
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561

Original Poster
Rep: Reputation: 57
well apparently it is not possible to simulate

SHIFT + ctrl + N

it confuses SHIFT + ctrl + N and ctrl + N
 
Old 11-10-2009, 01:11 PM   #7
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561

Original Poster
Rep: Reputation: 57
here is my screen with all the asked keys above

Quote:
hardstatus alwayslastline "%c %w"


bindkey ^[[1;5A prev

bindkey ^[[1;5B next


bindkey ^[[1;5D prev
bindkey ^[[1;5C next


## shift N, makes a new screen windows
bindkey ^N screen

## I forgot
bindkey ^[[1;2D prev
bindkey ^[[1;2C next


a question now, how to make the

ALT + RIGHT
or ALT + LEFT KEYS combinations working ??

Last edited by frenchn00b; 11-10-2009 at 01:13 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Screenrc disable CTRL-X for Lockscreen sadarax Linux - General 0 05-21-2009 05:18 PM
holding down left and down arrow does not repeat dave201 Linux - General 1 11-22-2008 04:19 PM
[Dell d830] Keyboard left and up arrow act strange v1pEr Linux - Hardware 0 03-28-2008 05:58 AM
Reload screenrc without restarting screen? gejr Linux - Software 2 09-13-2007 08:14 AM
Ctrl+ arrow keys is termianl and copy with keyboard chesss Linux - General 1 06-18-2006 03:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration