Click here to Skip to main content
Click here to Skip to main content
Go to top

Malayalam On-Screen Keyboard

, 2 Jun 2014
Rate this:
Please Sign up or sign in to vote.
On-Screen Keyboard for Malayalam

Introduction

When ocured a situation to write an essay in Malayalam I feel hard typing using keyboard. So, the idea of On-Screen Keyboad originated there. I have used On-Screen keyboard when my keyboard not working, so I decided to code an On-Screen keyboard in Malayalam.

Background

When started to coding I want Unicode code of Malayalam alphabets. I found it here: http://www.unicode.org/charts/PDF/U0D00.pdf

Using the code

First of all. I created a New Project with Visual C# - Windows Forms Application, and designed its interface by drag and drop Buttons like bellow.

Then I gave value to all buttons. The Unicode values can be given to buttons using "\u" preposition to indicate compiler that the value given is Unicode.

Eg. Malayalam letter "അ"'s Uinoce code is "0D05" and in C# it must be indicated as "\u0D05". The bellow code is giving Unicode values to buttons.

            button1.Text = "\u0D05";
            button2.Text = "\u0D06";
            button3.Text = "\u0D07";
            button4.Text = "\u0D08";
            button5.Text = "\u0D09";
            button6.Text = "\u0D0A";
            button7.Text = "\u0D0B";
            button8.Text = "\u0D0C";
            button9.Text = "\u0D0E";
            button10.Text = "\u0D0F";
            button11.Text = "\u0D10";
            button12.Text = "\u0D12";
            button13.Text = "\u0D13";
            button14.Text = "\u0D14";
            button15.Text = "\u0D3E";
            button16.Text = "\u0D3F";
            button17.Text = "\u0D40";
            button18.Text = "\u0D41";
            button19.Text = "\u0D42";
            button20.Text = "\u0D43";
            button22.Text = "\u0D46";
            button23.Text = "\u0D47";
            button24.Text = "\u0D48";
            button25.Text = "\u0D02";
            button26.Text = "\u0D1F";
            button27.Text = "\u0D1E";
            button28.Text = "\u0D1D";
            button29.Text = "\u0D1C";
            button30.Text = "\u0D1B";
            button31.Text = "\u0D1A";
            button32.Text = "\u0D19";
            button33.Text = "\u0D18";
            button34.Text = "\u0D17";
            button35.Text = "\u0D16";
            button36.Text = "\u0D15";
            button37.Text = "\u0D26";
            button38.Text = "\u0D25";
            button39.Text = "\u0D24";
            button40.Text = "\u0D23";
            button41.Text = "\u0D22";
            button42.Text = "\u0D21";
            button43.Text = "\u0D20";
            button44.Text = "\u0D31";
            button45.Text = "\u0D30";
            button46.Text = "\u0D2F";
            button47.Text = "\u0D2E";
            button48.Text = "\u0D2D";
            button49.Text = "\u0D2C";
            button50.Text = "\u0D2B";
            button51.Text = "\u0D2A";
            button52.Text = "\u0D39";
            button53.Text = "\u0D28";
            button54.Text = "\u0D27";
            button55.Text = "\u0D38";
            button56.Text = "\u0D37";
            button57.Text = "\u0D36";
            button58.Text = "\u0D35";
            button59.Text = "\u0D34";
            button60.Text = "\u0D33";
            button61.Text = "\u0D32";
            button62.Text = "\u0D4D";
            button72.Text = "\u0D57";

After giving Unicode values to all buttons. We need to code triggering code to capture button click and its actions. In this application all buttons need same code to trigger. The action code is, 

        void buttonClicked(object sender, EventArgs e)
        {
            Button button = sender as Button;
            SendKeys.Send(button.Text);
        }

The function "buttonClicked()" will send the value of Button to destination. When I click the button whose value is "അ", the function will send the letter "അ" to destination. "SendKeys.Send()" function is used to send the value to destination.It makes the same effect that we have pressed key "അ" in keyboard.

Now the action code is ready. Now we want to add this action to all buttons in application. 

The class "EventHandler" is used to add the action function to buttons.

 

            button1.Click += new EventHandler(buttonClicked);
            button2.Click += new EventHandler(buttonClicked);
            button3.Click += new EventHandler(buttonClicked);
            button4.Click += new EventHandler(buttonClicked);
            button5.Click += new EventHandler(buttonClicked);
            button6.Click += new EventHandler(buttonClicked);
            button7.Click += new EventHandler(buttonClicked);
            button8.Click += new EventHandler(buttonClicked);
            button9.Click += new EventHandler(buttonClicked);
            button10.Click += new EventHandler(buttonClicked);
            button11.Click += new EventHandler(buttonClicked);
            button12.Click += new EventHandler(buttonClicked);
            button13.Click += new EventHandler(buttonClicked);
            button14.Click += new EventHandler(buttonClicked);
            button15.Click += new EventHandler(buttonClicked);
            button16.Click += new EventHandler(buttonClicked);
            button17.Click += new EventHandler(buttonClicked);
            button18.Click += new EventHandler(buttonClicked);
            button19.Click += new EventHandler(buttonClicked);
            button20.Click += new EventHandler(buttonClicked);
            button22.Click += new EventHandler(buttonClicked);
            button23.Click += new EventHandler(buttonClicked);
            button24.Click += new EventHandler(buttonClicked);
            button25.Click += new EventHandler(buttonClicked);
            button26.Click += new EventHandler(buttonClicked);
            button27.Click += new EventHandler(buttonClicked);
            button28.Click += new EventHandler(buttonClicked);
            button29.Click += new EventHandler(buttonClicked);
            button30.Click += new EventHandler(buttonClicked);
            button31.Click += new EventHandler(buttonClicked);
            button32.Click += new EventHandler(buttonClicked);
            button33.Click += new EventHandler(buttonClicked);
            button34.Click += new EventHandler(buttonClicked);
            button35.Click += new EventHandler(buttonClicked);
            button36.Click += new EventHandler(buttonClicked);
            button37.Click += new EventHandler(buttonClicked);
            button38.Click += new EventHandler(buttonClicked);
            button39.Click += new EventHandler(buttonClicked);
            button40.Click += new EventHandler(buttonClicked);
            button41.Click += new EventHandler(buttonClicked);
            button42.Click += new EventHandler(buttonClicked);
            button43.Click += new EventHandler(buttonClicked);
            button44.Click += new EventHandler(buttonClicked);
            button45.Click += new EventHandler(buttonClicked);
            button46.Click += new EventHandler(buttonClicked);
            button47.Click += new EventHandler(buttonClicked);
            button48.Click += new EventHandler(buttonClicked);
            button49.Click += new EventHandler(buttonClicked);
            button50.Click += new EventHandler(buttonClicked);
            button51.Click += new EventHandler(buttonClicked);
            button52.Click += new EventHandler(buttonClicked);
            button53.Click += new EventHandler(buttonClicked);
            button54.Click += new EventHandler(buttonClicked);
            button55.Click += new EventHandler(buttonClicked);
            button56.Click += new EventHandler(buttonClicked);
            button57.Click += new EventHandler(buttonClicked);
            button58.Click += new EventHandler(buttonClicked);
            button59.Click += new EventHandler(buttonClicked);
            button60.Click += new EventHandler(buttonClicked);
            button61.Click += new EventHandler(buttonClicked);
            button62.Click += new EventHandler(buttonClicked);
            button72.Click += new EventHandler(buttonClicked);

The function "buttonClicked()" added as common Click Mouse action trigger to all buttons.

Now we can type Malayalam letters using this application. But the value of clicked button receives the application it self. So we can type any other places using this application. So we need to incativate this application always. If we do so, we can type the Malayalam letters in active windows. The code to inactivate the window is bellow,

        protected override CreateParams CreateParams
        {
            get
            {
                CreateParams param = base.CreateParams;
                param.ExStyle |= 0x08000000;
                return param;
            }
        }

Now, the window of our application is always incative and we can type Malayalam letters to active application.

But the new problem is that active window can overlap our application. So we need to drag our application always to set a good position to see both active application and our Keyboard application. So It is better to make our application 'Always Top'. We can apply this property using "Property" box of form by making "TopMost" property "true".

Yes, now our application will always on top and always inactive. So we can type Malayalam letters easy.

Hope you like this article. Thank you...

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Ajith_Kp
Student BCA AT AMSTECK ARTS AND SCIENCE COLLEGE, KALLIASSE
India India
I'm BCA student. I like programming as well as compute/network security analysing. I'm interesting in exploit programming and some malicious nature programming. I'm now concentrating in PHP, Ajax, JQuery, C# and JAVA.
 
Blog: http://www.terminalcoders.blogspot.in
 
Packetstorm Security: http://packetstormsecurity.com/files/author/9778/
Follow on   Twitter   Google+

Comments and Discussions

 
QuestionNice! PinprofessionalVolynsky Alex3-Jun-14 8:11 
AnswerRe: Nice! PinmemberAjith_Kp12-Jun-14 3:14 
GeneralRe: Nice! PinprofessionalVolynsky Alex12-Jun-14 4:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web01 | 2.8.140916.1 | Last Updated 2 Jun 2014
Article Copyright 2014 by Ajith_Kp
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid