# Key binding error when using gdb through ssh in SLES 11

**URL:** <https://forums.suse.com/t/key-binding-error-when-using-gdb-through-ssh-in-sles-11/30118>\
**Category:** SLES Configure-Administer\
**Created:** [August 2, 2017, 12:08pm UTC](https://forums.suse.com/t/key-binding-error-when-using-gdb-through-ssh-in-sles-11/30118 "2017-08-02T12:08:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan1990](https://avatars.discourse-cdn.com/v4/letter/d/dbc845/32.png) [@Dan1990](https://forums.suse.com/u/Dan1990)\
**Post date:** [August 2, 2017, 12:08pm UTC](https://forums.suse.com/t/key-binding-error-when-using-gdb-through-ssh-in-sles-11/30118/1 "2017-08-02T12:08:11Z")

</div>

I am using gdb in a remote computer to which I am connected through ssh. The problem is that there are some key bindings I usually use that are wrong. Specially, the problem is that the keys “Page-Up” and “Page-Down” are interpreted as the character “~” instead of perform the Page-Up / Page-Down operation. I have been searching in google for days but I have been unabled to find an answer.

I have tested the above connecting from other computers with Windows (MobaxTerm) and SLES 12. In both cases, the Page-Up / Page-Down key works properly. so the problem only appears when I connect to the other computer from SLES 11.

I have tried to use sh, bash and csh, and nothing works.

What is going wrong?

---

<div class="post-metadata">

**Author:** ![ab1](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@ab1](https://forums.suse.com/u/ab1)\
**Post date:** [August 2, 2017, 4:14pm UTC](https://forums.suse.com/t/key-binding-error-when-using-gdb-through-ssh-in-sles-11/30118/2 "2017-08-02T16:14:56Z")

</div>

Interesting; out of curiosity (as I am a gdb amateur) what do page-up and  
page-down do in gdb?

Anyway, I believe this is something you can fix pretty easily by modifying  
your user’s (or the system’s) ~/.inputrc file. I was able to see what you  
saw, and then I just appended /etc/inputrc to the end of ~/.inputrc (which  
already exists, but only had commented-out and blank lines) using the  
following command:

```auto
cat /etc/inputrc >> ~/.inputrc
```

There is a section in there on ‘xterm’ being used as the terminal (true  
for me when SSHing from my laptop (OpenSUSE) to my server (SLES 11)) so I  
presume one of those lines are specifically helping.

Logged out and back in, and now I do not see tildes; I do not see anything  
really, but I suspect that is because I do not know what it should be  
doing, or I am not in the right part of gdb; I’ll rely on you to let me  
know if that works.

For the record, deleting my user’s ~/.inputrc file also seemed to do the  
same thing:

```auto
rm ~/.inputrc
#logout/login
```

–  
Good luck.

If you find this post helpful and are logged into the web interface,  
show your appreciation and click on the star below.

If you want to send me a private message, please let me know in the  
forum as I do not use the web interface often.

---

<div class="post-metadata">

**Author:** ![Dan1990](https://avatars.discourse-cdn.com/v4/letter/d/dbc845/32.png) [@Dan1990](https://forums.suse.com/u/Dan1990)\
**Post date:** [August 2, 2017, 4:42pm UTC](https://forums.suse.com/t/key-binding-error-when-using-gdb-through-ssh-in-sles-11/30118/3 "2017-08-02T16:42:23Z")

</div>

Thanks for the answer.

Asnwering to your question, if you have enabled the history search with page-up / page-down keys in your terminal (bash, sh, csh …), you can use the same feature in gdb,. That is, imagine you write “break main” in the gdb prompt. Then, type “bre” and press page-up. gdb should complete your sentence until “break main”, like a typical terminal. This is so useful for large gdb commands.

Regards.

---

<div class="post-metadata">

**Author:** ![ab1](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@ab1](https://forums.suse.com/u/ab1)\
**Post date:** [August 2, 2017, 5:02pm UTC](https://forums.suse.com/t/key-binding-error-when-using-gdb-through-ssh-in-sles-11/30118/4 "2017-08-02T17:02:43Z")

</div>

Thanks for the explanation.

Did the inputrc stuff work?

–  
Good luck.

If you find this post helpful and are logged into the web interface,  
show your appreciation and click on the star below.

If you want to send me a private message, please let me know in the  
forum as I do not use the web interface often.
