LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-08-2008, 08:36 AM   #1
HarryBoy
Member
 
Registered: Apr 2008
Distribution: MontaVista Linux Version 4.0.1, Professional Edition
Posts: 215

Rep: Reputation: 16
Keyboard not being recognised


Hi there, I am trying to execute a tutorial from www.directfb.org where I use the keyboard to move a sprite around the screen.
Here is the turorial:
http://www.directfb.org/docs/DirectF...ls/sprite.html

I am running it on a DaVinci development board from TI.
The code is as follows:

DFBCHECK (keyboard->GetKeyState (keyboard, DIKI_LEFT, &state));
if (state == DIKS_DOWN)
{
sprite_x--;
}

DFBCHECK (keyboard->GetKeyState (keyboard, DIKI_RIGHT, &state));
if (state == DIKS_DOWN)
{
sprite_x++;
}

etc.....

Whenever I press the arrow keys on the keyboard all I get on the output console window is:
^[[A^[[A^[[A^[[C^[[C^[[B^[[B^[[D^[[


Can anyone help me with this? Is there something I need to do?
If you need anymore information I can provide you with it.

Thanks

Harry
 
Old 05-09-2008, 01:02 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
How is the program supposed to acquire the correct keyboard?
 
Old 05-09-2008, 04:53 AM   #3
HarryBoy
Member
 
Registered: Apr 2008
Distribution: MontaVista Linux Version 4.0.1, Professional Edition
Posts: 215

Original Poster
Rep: Reputation: 16
Reply

See http://www.directfb.org/docs/DirectF...ls/sprite.html for the whole program, it is not that long.

Basically its:

static IDirectFBInputDevice *keyboard = NULL;
static IDirectFB *dfb = NULL;
dfb->GetInputDevice (dfb, DIDID_KEYBOARD, &keyboard);


The program is running in a directory on a Fedora Virtual Machine. The directory is exported to a Davinci development board. I'm thinkin I have to do something for the davinci development borad to recognise the keyboard but since I'm a Linux newbie I need help with this.

Thanks

harry
 
Old 05-09-2008, 04:54 AM   #4
HarryBoy
Member
 
Registered: Apr 2008
Distribution: MontaVista Linux Version 4.0.1, Professional Edition
Posts: 215

Original Poster
Rep: Reputation: 16
Link

Sorry but the link is here:
http://www.directfb.org/docs/DirectF...ls/sprite.html

Thanks

Harry
 
Old 05-09-2008, 07:33 PM   #5
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
If you feel that way, you should try the code in a linux box.
I've looked at the code - the question is supposed to direct your thoughts.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Gateway memory card reader and keyboard not recognised properly OpEn_SoUrCe_RoCkS Linux - Hardware 12 05-12-2008 06:00 PM
Can't use LiveCDs because keyboard isn't recognised qwerty Linux - General 2 01-29-2006 05:44 PM
modem not recognised Greebstreebling Linux - Hardware 2 12-15-2005 10:17 AM
ps2 keyboard not recognised auton1 Linux - Laptop and Netbook 3 08-30-2005 12:50 AM
Winmodem not recognised strobart Linux - Hardware 5 09-06-2004 10:41 AM


All times are GMT -5. The time now is 05:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration