hotkeys for linux , what you assign is hot(key) you get ;)

This forums is for OS project announcements including project openings, new releases, update notices, test requests, and job openings (both paying and volunteer).
Post Reply
ashes
Posts: 2
Joined: Thu Oct 16, 2008 1:15 pm

hotkeys for linux , what you assign is hot(key) you get ;)

Post by ashes »

hi people ,

I have made a project to assign user defined HOTKEYS , which basically is targetted to a parametric user . i have uploaded the source code . Please test in on your PC . on any linux version , its stable . The code snippet is for hot keys till ctrl+h starting from ctrl+a.

please give me a feedback to this email : [email protected]
or within this thread

thank you

Code: Select all

#code ::
#!/bin/bash


echo  "\n##################             welcome to the AA-HOTKEY version 1.3‫               ########################\n"
echo  "IMPLEMENTED AS A PART OF OPERATING SYSTEM BY:"
echo  "                                               --abhirup dutta (06co04)"
echo  "                                               --ashish g bhat (06co15)"
echo  "                                                  NITK ,SURATHKAL      "
echo "/////////Enter the command/application which you want to set as a hot key in full//////////"
read var



echo "note : the following hotkeys already exist and inputting the same hot key may overwrite the program 
Ctrl+C = Kill process (Kill the current process in terminal, also used to copy elsewhere)
Ctrl+Z = Send process to background
Ctrl+D = Log out from the current terminal. In X, this may log you out after a shuting down the emulator.

Ctrl+A = Home (Move cursor to beginning of line)
Ctrl+E = End (Move cursor to end of line)
Tab = List available commands from typed letters (Ex: type iw and click tab, output = iwconfig iwevent iwgetid iwlist iwpriv iwspy)

Ctrl+U = Delete current line
Ctrl+K = Delete current line from cursor
Ctrl+W = Delete word before cursor in terminal (Terminal only, also used to close the current document elsewhere)

Arrows up and down = Browse command history
Ctrl+R = History search (Finds the last command matching the letters you type)

Shift+PageUp / PageDown = Scroll terminal output
Ctrl+L = Clears terminal output
Shift+insert = Paste"


echo "#########################################################################################################"



echo "*****************            SELECT FROM THE LIST OF THE MENU         ************************"
echo " ################                           MENU                             ################# "
echo " ########                   1.ctrl+ANY ALPHABET OF YOUR CHOICE                      ##########"
echo " ########                    2.alt+ANY ALPHBET OF YOUR CHOICE                        ##########"
#echo" ########                 3.ctrl+alt+ANY ALPHABET OF YOUR CHOICE                    ##########"
echo " #############################################################################################"



read hotin




grep "hotin" ~/.inputrc >> /dev/null

if [ $? -ge 0 ]
then 
echo " you have already assigned this hot key "
echo " press CTRL+C to exit "
echo " or continue to overwrite "
fi



if [ $hotin = "ctrl+p" ]
then
	echo " ||      CTRL+P       || IS NOW YOUR SHORTCUT FOR ||      $var       ||\n\n"
	 echo "\"\":\"$var\C-M\"""ctrl+p" >> ~/.inputrc
fi

if [ $hotin = "ctrl+a" ]
then
	echo " ||      CTRL+A       || IS NOW YOUR SHORTCUT FOR ||      $var       ||\n\n"
	 echo "\"\":\"$var\C-M\"" >> ~/.inputrc
fi
if [ $hotin = "ctrl+b" ]
then
	echo " ||      CTRL+B       || IS NOW YOUR SHORTCUT FOR ||      $var       ||\n\n"
	 echo "\"\":\"$var\C-M\"" >> ~/.inputrc 
fi
#if [ $hotin = "ctrl+c" ]
#then
#	echo " ||      CTRL       || IS NOW YOUR SHORTCUT FOR ||      $var       ||\n\n"
#	 echo "\"\":\"$var\C-M\"" >> ~/.inputrc
#fi
# these are commented since these are already existing hotkeys in the konsol

#if [ $hotin = "ctrl+d" ]
#then
#	echo " ||      CTRL+D      || IS NOW YOUR SHORTCUT FOR ||      $var       ||\n\n"
#	 echo "\"\":\"$var\C-M\"" >> ~/.inputrc
#fi

if [ $hotin = "ctrl+e" ]
then
	echo " ||      CTRL+E       || IS NOW YOUR SHORTCUT FOR ||      $var       ||\n\n"
	 echo "\"\":\"$var\C-M\"" >> ~/.inputrc
fi
if [ $hotin = "ctrl+f" ]
then
	echo " ||      CTRL+F       || IS NOW YOUR SHORTCUT FOR ||      $var       ||\n\n"
	 echo "\"\":\"$var\C-M\"" >> ~/.inputrc
fi
if [ $hotin = "ctrl+g" ]
then
	echo " ||      CTRL+G       || IS NOW YOUR SHORTCUT FOR ||      $var       ||\n\n"
	 echo "\"\":\"$var\C-M\"" >> ~/.inputrc
fi
if [ $hotin = "ctrl+h" ]
then
	echo " ||      CTRL+h       || IS NOW YOUR SHORTCUT FOR ||      $var       ||\n\n"
	 echo "\"\":\"$var\C-M\"" >> ~/.inputrc
fi
Last edited by ashes on Thu Oct 16, 2008 11:28 pm, edited 1 time in total.
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Re: hotkeys for linux , what you assign is hot(key) you get ;)

Post by Brynet-Inc »

What does this have to do with OS development, and why didn't you use

Code: Select all

[ /code] blocks?
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
cr2
Member
Member
Posts: 162
Joined: Fri Jun 27, 2008 8:05 pm
Location: ND, USA

Re: hotkeys for linux , what you assign is hot(key) you get ;)

Post by cr2 »

I agree with Brynet-Inc.

I also think that you should be on OSDEV.ORG if you are simply making a new linux distro. I wouldn't consider that OS Development in any stretch of the imagination. [-X
OS-LUX V0.0
Working on...
Memory management: the Pool
ashes
Posts: 2
Joined: Thu Oct 16, 2008 1:15 pm

Re: hotkeys for linux , what you assign is hot(key) you get ;)

Post by ashes »

oh sorry guys ... i am a new bie .. where do you intend me to post this and get the feed back
please reply
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: hotkeys for linux , what you assign is hot(key) you get ;)

Post by AJ »

I was going to put this in general programming but think Test Requests is more appropriate.


@OP I would strongly recommend removing your e-mail address from your post content.

Cheers,
Adam
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Re: hotkeys for linux , what you assign is hot(key) you get ;)

Post by Brynet-Inc »

ashes wrote:oh sorry guys ... i am a new bie .. where do you intend me to post this and get the feed back
please reply
Another forum? this is an operating system development forum... perhaps if you were an existing member trying to test something you wrote in your spare time.

But, how is it at all relevant to us? and as a first post? honestly I think you're lost or something.

Try http://www.ubuntuforums.org/
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
Post Reply