LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Changing the behavior of Ctrl-S keybinding/keyboard mapping (http://www.linuxquestions.org/questions/linux-newbie-8/changing-the-behavior-of-ctrl-s-keybinding-keyboard-mapping-620129/)

madiyaan 02-10-2008 02:04 PM

Changing the behavior of Ctrl-S keybinding/keyboard mapping
 
Hello:

I am a user of a Linux machine that I don't have root access to. I mostly just ssh into that machine using Cygwin's shell/terminal. I want to change the behavior of Ctrl-S since I use Vim and inside Vim I have made a mapping of Ctrl-S to save (:w). However, whenever I press Ctrl-S, the terminal gets suspended and I have to press Ctrl-Q to resume it. It gets really annoying since I am really really used to saving by pressing Ctrl-S (from using MS products).

Is it possible to change this keybinding as a user of the system (not root)?

Second question, when I ssh, if I become idle for 2 minutes it automatically kills the connection. Is there some software that makes sure I am not idle by periodically pressing a key like alt or Esc in the terminal? (Not talking about a mouse macro or something like that... I am talking of maybe a command line argument to ssh to make sure my connection stays even after 2 minutes. Something like 10 minutes idle time would be much more sane).

Thanks,

bigrigdriver 02-10-2008 02:21 PM

If you're using KDE you can go to Control Center, Regional & Accessibility, Keyboard Shortcuts, Application Shortcuts and chamge the mapping for File - Save to Ctrl S.

In re the timeout, there should be a file in /etc in which you can change a setting to "keep alive" or some such thing. I can't really help you beyond that.

madiyaan 02-10-2008 02:35 PM

Quote:

Originally Posted by bigrigdriver (Post 3052588)
If you're using KDE you can go to Control Center, Regional & Accessibility, Keyboard Shortcuts, Application Shortcuts and chamge the mapping for File - Save to Ctrl S.

In re the timeout, there should be a file in /etc in which you can change a setting to "keep alive" or some such thing. I can't really help you beyond that.

Thanks for the advice, but I am using Cygwin and Putty most of the time. I need to change some setting on the terminal itself, or maybe in my home directory where I ssh into to change the behavior of Ctrl-S etc.

I found the keep alive setting there, so thanks for that. Case is closed as far as that is concerned.

madiyaan 02-10-2008 02:40 PM

Quote:

Originally Posted by madiyaan (Post 3052607)
Thanks for the advice, but I am using Cygwin and Putty most of the time. I need to change some setting on the terminal itself, or maybe in my home directory where I ssh into to change the behavior of Ctrl-S etc.

I found the keep alive setting there, so thanks for that. Case is closed as far as that is concerned.

Case closed for Ctrl-S keybinding issue.

I found this great webpage: http://sealence.x10hosting.com/wordpress/?p=28.

Basically the command to execute is this:

Code:

stty -ixon -ixoff


All times are GMT -5. The time now is 01:56 AM.