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

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
Get file path + file name in a keybindings file in Sublime Text 2
GNU screen custom key bindings format
Sublime Text 2 up/down arrow movement keybinding
tmux up-pane/down-pane missing

Categories

HOME
ckan
optimization
alasql
ssh
bigtable
ibm
c++builder
conceptual
spotfire
google-docs-api
grid
angularjs-directive
yuv
kohana
kendo-asp.net-mvc
restheart
obd-ii
box-api
segmentation-fault
oms
aws-sdk-cpp
javascript-debugger
saucelabs
webseal
game-engine
k-means
taxonomy
android-actionbar
alert
views
audio-streaming
react-jsx
datastax-enterprise
resx
git-submodules
pushpad
mobile-development
arp
loopback
qt-designer
imageprocessor
gstreamer-1.0
azure-storage-files
stencyl
mockserver
byobu
mediastream
wicket-tester
flume-ng
wufoo
hierarchical-clustering
dcom
skype-bots
jcs
ajv
typewriter
liferay-ide
rmq
robotc
breadcrumbs
firebase-job-dispatcher
firebase-polymer
settext
foreground
hoare-logic
normalisation
django-taggit
python-rq
transbase
updating
vanilla-forums
eaaccessory
callfire
data-representation
screen-lock
gmaps4jsf
parseexception
veeam
nfa
firebase-tools
react-os
vundle
pnunit
javacompiler
dateadd
tlbimp
objectdatasource
record-locking
jython-2.5
dd4t
gmail-imap
nx
biztalk-deployment
idoc
tasklist
gssapi
esi
event-propagation
wxperl
win-prolog
inserthtml
jqzoom
parallel-python
functional-specifications
netbeans7.0
large-data-volumes
glassfish-embedded
datadude

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