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

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
Get file path + file name in a keybindings file in Sublime Text 2

Categories

HOME
twitter-bootstrap
weblogic
hex
stdout
salesforce-lightning
opc-ua
psexec
opacity
travis-ci-cli
country-codes
markdown
browserstack
rethinkdb
google-api-oauth
vsixmanifest
restheart
promotions
minimax
spring-data-solr
jcodemodel
xmlhttprequest
oxid
project-structure
v4l2
advertising
android-wear-2.0
osgi-bundle
jms-topic
folder
undo
campaign-monitor
sdl-2
area
mockserver
icu
file-descriptor
autodesk-data-management
binary-decision-diagram
apiman
wufoo
yank
history
standard-error
openpgp.js
kendo-scheduler
blackberry
chain
zedgraph
scrollmagic
robotc
ownership
universe
networkstream
mate-desktop
key-value-store
csc
nimbus
clique
jsondoc
bioconductor
sdkman
gulp-cdnizer
windows-phone-8-emulator
om
traminer
autoscaling
callfire
vectordrawable
grails-3.0.9
waterline
esb-toolkit-2.1
genero
wingdb
indices
livescript
nsmutableurlrequest
time-frequency
amzi-prolog
android-relativelayout
sendy
elixir-framework
object-oriented-database
node-mongodb-native
windows-phone-store
8-puzzle
octokit
ojb
xrandr
azure-scheduler
mmo
phone-state-listener
microsoft-speech-platform
doxia
ios6-maps
jquery-ui-map
nserror
jqueryi-ui-buttonset
utm
jqzoom
clgeocoder
xpolog
zipstream
iphone-maps
dongle
uccapi
mysql-pconnect
rpxnow
opengl-to-opengles

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