keyboard with arduino problem

so i have my key board hooked up to my lcd(20, 4) but when one column is full it go's down 2 rows instead of one and then go's to the second one. can anyone give me a code to solve this, if you do i will put up a vid on youtube on how to set up the keyboard with the arduino and lcd. :)PLEASE HELP PLEASE HELPPLEASE HELP

It is not necessary to double-post your question to get attention. Why not delete the extra post so that people don't waste their time splitting up the conversation: http://arduino.cc/forum/index.php/topic,59989.0.html

You should probably post your code (using the "#" button in the post editor) and a diagram of how your hardware is setup. Include information like: What kind of LCD? What kind of keyboard? What pins are you using on the Arduino for each?

Just asking for code to make something work is generally not successful.

here is my code. sorry about the double post.

#include <PS2Keyboard.h>  
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 1, 0, 2);
#define KBD_CLK_PIN  3 
#define KBD_DATA_PIN 4 

PS2Keyboard keyboard;  
// your LCD using them: 
const int r = 4;
const int c = 20;

void setup() {
  
  keyboard.begin(KBD_DATA_PIN);  
  pinMode(6, OUTPUT);
  lcd.begin(c, r);
  pinMode(13, OUTPUT);
  pinMode(8, OUTPUT);
  digitalWrite(6, HIGH);
  lcd.setCursor(7, 0);
  lcd.print("C.O.S.");
  lcd.setCursor(5, 1);
  lcd.print("BETA: -3.1");
  lcd.setCursor(1, 2);
  lcd.print("KEYBOARD USE ONLY!");
  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~``
  delay(5000);
  lcd.clear();
  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  lcd.print("KEYBOARD");
}  
  
#define is_printable(c) (!(c&0x80))   // don't print if top bit is set  
  
void loop() {
  
  if(keyboard.available()) {  
    lcd.blink();
    // reading the "extra" bits is optional  
    byte   extra = keyboard.read_extra(); // must read extra before reading the character byte  
    byte       c = keyboard.read();  
  
    boolean ctrl = extra & 1;  // <ctrl> is bit 0  
    boolean  alt = extra & 2;  //  <alt> is bit 1  
  
    if (ctrl) lcd.print('^');  
    if (alt)  lcd.print('_');  
  
    if      (c==PS2_KC_UP)      lcd.print("up");  
    else if (c==PS2_KC_DOWN)    lcd.print("down");
    else if (c==PS2_KC_RIGHT)   lcd.scrollDisplayRight(); 
    else if (c==PS2_KC_LEFT)    lcd.scrollDisplayLeft(); 
    else if (c==PS2_KC_BKSP)    lcd.clear();
    else if (c==PS2_KC_ESC)   { lcd.print("escape and reset"); keyboard.reset(); }  
    else if ( is_printable(c) ) lcd.print(c);   // don't print any untrapped special character
    else if (c==PS2_KC_HOME) {
      digitalWrite(13, HIGH);
    }
    else if (c==PS2_KC_END) {
      digitalWrite(13, LOW);
    }
    else if (c==PS2_KC_PGUP)   digitalWrite(6, HIGH);
    else if (c==PS2_KC_PGDN)   digitalWrite(6, LOW);
    else if (c==PS2_KC_INS)    digitalWrite(8, HIGH);
    else if (c==PS2_KC_DEL)    digitalWrite(8, LOW);
  }   
}  [

hope you can get the pins out of my code. i have a 20x4 parallel lcd from hacktronics, wite on blue.
the setup is
arduino uno
20x4 white on blue lcd
ps2 keyboard
that is all

deselcat22:
... when one column is full it go's down 2 rows instead of one and then go's to the second one ...

I think this is just a characteristic of the hardware. It is supposed (!) to do that. Something to do with the way the memory internally is organized.

The example code from Hacktronics shows how to move down to the second line:

  lcd.setCursor(0,0);           // set cursor to column 0, row 0 (the first row)
  lcd.print("Hello, World");    // change this text to whatever you like. keep it clean.
  lcd.setCursor(0,1);           // set cursor to column 0, row 1
  lcd.print("hacktronics.com");

Basically, don't let the text overflow the line. Control where it goes, and user setCursor to move the cursor to where you want to draw.

And when people ask for what type of LCD, they generally want a part number, so they can look up the data sheet and see what that says. Just saying "20x4 parallel lcd from hacktronics, wite on blue" doesn't really help. The part number, rather than where you got it, or the colour, is the important bit.

i know how to set cursor but i need a code so when for example i have 20 letters on line one it will go down one line instead of two

Draw 20 letters and then do a setCursor. That's how the hardware works.