key-bindings


home\ end keys in xterm not behaving correctly


While I'm opening an xterm from my tsh at work, the Home and End keys scroll the xterm screen up and down respectively instead of moving to the beginning\ end of the line.
According to /etc/inputrc, my key binding is:
"\e[1~": beginning-of-line
"\e[4~": end-of-line
...
"\e[H": beginning-of-line
"\e[F": end-of-line
Which is exactly what every site I found on the subject suggested, and yet - with no use.
If it means anything, the Ctrl-a, Ctrl-e behave as they should, but since I'm used for other keying, I'm missing.
Needless to say, since it is a work computer, I don't have writing permissions to the /etc/inputrc file and nobody is willing to change it for me.
How can I bypass this problem?
Don't really care if the solution will be a change in some file or an option to add to the xterm command.
p.s. (thanks to comment)
Before asking, I tried setting the same binding in my ~/.inputrc file, didn't work either
The problem is unrelated to any possible setting in .inputrc (that doesn't scroll your screen up and down, though you could scroll through the command-history, etc).
If it's xterm (and not some other terminal), you can fix this with the translations resource, e.g., by using xev to identify the names for the home/end keys (probably just home and end), and using those names in a translation like this (in your X resources):
*VT100*translations: #override \n\
<key>home: string(0x1b) string("[1~") \n\
<key>end: string(0x1b) string("[4~") \n
Solaris used to do this for the page-up/page-down keys, and (for instance) if you are using an old version such as Solaris 10, the advice in the xterm FAQ Why can't I use the pageup/pagedown keys? is relevant.
Further reading:
.Xresources or .Xdefaults? may be helpful. Most of the comments on X resources assume that you use X only locally, on a desktop. If your use is more general than that, .Xdefaults (usually with the hostname appended) is the place to start. Otherwise, .Xresources is useful.
Sven Maschek's XTerm app-defaults file

Related Links

Bind key prefix + ; to open command-prompt in tmux
keybinding to interchange keyboard language
Is there a move cursor to nearest '=' code navigation in IntelliJ?
Disabling Mousewheel Bind
Fish shell ESC/META keybinding with iterm2 on os x yosemite
XMonad: Is there a way to bind a simultaneously triggered keychord?
Simple key binding issue
unable to get C-PGUP or C-PGDOWN key codes in tmux
How do I override a default keybinding in LightTable?
Is it possible to change key bindings in Sublime Text dynamically from a plugin?
Ace Editor - Change CTRL+H keybinding
KeyBindings in Java stop working after component is remade
Tmux Scroll Up/Down Page using Ctrl-b and Ctrl-f
How to create key binding to set XML syntax?
How to bypass a bindkey directive in GNU screen?
XMonad keybindings doesn't work

Categories

HOME
excel-formula
system-calls
sql-server-2014
compression
azure-eventhub
android-ndk
file-upload
livecharts
jquery-plugins
spotfire
watson-iot
ubuntu-14.04
xss
perl6
aggregation-framework
sequence
handlebars.js
restheart
ephesoft
jcodemodel
fetch
tracking
smooth-scrolling
filehelpers
audio-streaming
glibc
gomobile
typedef
infinite-loop
v4l2
handle
aspxgridview
core-animation
grunt-contrib-uglify
oracle10g
continuous-fourier
ballerinalang
git-submodules
pushpad
drawrect
ios-autolayout
ibm-bpm
ng-lightning
redbean
mtm
vpython
wufoo
nshttpurlresponse
spring-webflow-2
g77
jsfl
skype-bots
fckeditor
android-vectordrawable
try-catch-finally
scanf
spring-social-twitter
mac-app-store
geokit
nimbus
jmh
periodic-processing
dcast
askbot
android-facebook
maven-antrun-plugin
om
openhab
borland-c++
p4python
litedb
eggplant
grails-3.0.9
avd
gcc-warning
nfa
pysvn
dojox.grid
fxmlloader
lwuit
agent-based-modeling
oxygenxml
iwork
mdp
google-voice
outlook-object-model
servicemanager
nx
biztalk-deployment
qt5.1
yii-components
configurationsection
expresso-store
code-organization
zend-validate
clgeocoder
symfony-1.2
excellibrary
silverlight-2.0
tracd

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App