[ale] backspace key

Geoffrey Myers geof at denali.is.net
Thu Aug 29 23:14:38 EDT 1996


For what it's worth, I've got my backspace key in both X and terminal mode
working as a backspace.  It's been a while, but I'll give you what I've done.
Don't ask me why, like a good programmer, I never documented it.  There may
be a 'better' way or a 'right' way to get what you want.  All I know is that
the following stuff makes my work and I don't recall how it all works.  All
the code below is delimited by '}' to make it stand out.

I have the following in my /etc/profile:

} case $TTY in
} 
} tty[0-9] )
} 
}		# this if statement remaps the backspace key and delete keys to
}		# what I like.  The purpose of the KEYS_SET flag is to insure this
}		# key remapping only happens once.  I don't recall the situation where
}		# it get's executed twice, but I added the variable and exported it for
}		# a reason. :)
} 
}	 if [ "$KEYS_SET" != "YES" ]; then
}		 cat /usr/lib/kbd/keytables/defkeymap.map /usr/add-on/lib/my.map |
}			 loadkeys 2>/dev/null
}		 export KEYS_SET=YES
}	 fi
} ;;
} esac
}
} # this line sets stty properly for the above key mappings
} stty echoe erase ^H intr ^?

The file /usr/lib/kbd/keytables/defkeymap.map above is the system default, the
second file /usr/add-on/lib/my.map contains my modifications as follows:

} keycode  14 = BackSpace           BackSpace          
} 	control	keycode  14 = BackSpace       
} 	alt	keycode  14 = Meta_Delete     
} keycode 111 = Delete

Finally, in my .xinitrc file I have the following entry:

} xmodmap .modmap &

And the file .modmap contains the following:

} keycode 0x16 = BackSpace

Now, there may be a better way to do what you want, but I know this works
for me.  That is my backspace key, backspaces, my kill key is the control-U
and my delete key is the interrupt key.

}> Is there any way to fix my backspace key so that it will backspace from the 
}end
}> of the line instead of delete in X.
}> 
}
}
}xmodmap -e "keycode 22 = BackSpace"
}
}However you lose the delete. So I do
}
}xmodmap -e "keycode 22 = BackSpace Delete"
}
}So that a shift backspace gives a delete.
}
}Slackware 3.0's xinit is setup up with this command in a file called
}
}/usr/lib/X11/xinit/.Xmodmap
}
}which it invokes when X starts. Not sure about Red Hat
}
}Hope this helps,
}
}BAJ

-- 
Until later:
Geoffrey Myers   geof at denali.is.net   Unix.Guru.Dude at worldnet.att.net
	http://www.ticllc.net/~geof  or http://denali.is.net/~geof

	Opinions expressed by me are mine, all mine, only mine.....






More information about the Ale mailing list