Click here to Skip to main content
12,394,978 members (65,102 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

4.2K views
248 downloads
5 bookmarked
Posted

Malayalam On-Screen Keyboard

, 2 Jun 2014 CPOL
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

AjithKp560_
Student MCA student at School of Information Science and T
India India
I'm MCA student at School of Information Science and Techonolgy, Kannur University Campus, Mangattuparamba. I like programming as well as computer/network security analyzing. I'm interesting in exploit programming and some malicious nature programming. I'm now concentrating in Android, PHP, Python, Ajax, JQuery, C# and JAVA.

Blog: http://www.terminalcoders.blogspot.in

Packetstorm Security: http://packetstormsecurity.com/files/author/9778/

I'm working as freelance PHP, Android, Python and Java developer. Please contact me at ajithkp560@gmail.com

You may also be interested in...

Comments and Discussions

 
Questionwhat to do if non-form application is used? Pin
Member 1211607016-Nov-15 21:05
memberMember 1211607016-Nov-15 21:05 
QuestionHow get the char Pin
Basheerchukkan22-Sep-15 0:41
memberBasheerchukkan22-Sep-15 0:41 
QuestionNice! Pin
Volynsky Alex3-Jun-14 8:11
professionalVolynsky Alex3-Jun-14 8:11 
AnswerRe: Nice! Pin
Ajith_Kp12-Jun-14 3:14
memberAjith_Kp12-Jun-14 3:14 
GeneralRe: Nice! Pin
Volynsky Alex12-Jun-14 4:19
professionalVolynsky Alex12-Jun-14 4:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    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 | Terms of Use | Mobile
Web02 | 2.8.160721.1 | Last Updated 2 Jun 2014
Article Copyright 2014 by AjithKp560_
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid