I changed something again. When I did the last command, it made home and end key work properly, but the page-down and page-up, and delete key stopped working. I think the ~/.inputrc completely replaces the commands in /etc/inputrc, instead of just adding to them. So I took the /etc/inputrc file, made a few changes to it, and copied it to ~/.inputrc. I didn't just make the changes in /etc/inputrc because it is part of a system file, and whenever I upgrade the package, the changes I placed in it would disappear.
-It might make sense for the package maintainer to make this change in /etc/inputrc.
Here is my latest ~/.inputrc (copied and changed from /etc/inputrc)
# /etc/inputrc - ~/.inputrc
# This file configures keyboard input for programs using readline.
# See "man 3 readline" for more examples.
# Configure the system bell. Options are none, visible, and audible.
#set bell-style none
# Enable 8 bit input.
set meta-flag On
set input-meta On
set convert-meta Off
set output-meta On
# Set various nice escape sequences:
# for linux console
# for rxvt #added
# for xterm
# for freebsd console