Need Help with making a ' # ' on a 3x4 keypad into an enter key

Hello All,

I am a complete beginner to any kind of hardware programming. So the project I am working on is the following:
A 16x2 LCD display will output a mathematical calculation, say " 120 x 10 ".
I want to be able enter an answer and hit the ' # ' key on my keypad to act as an enter key.
So if anyone is confused, lets say I am doing this in the language java or c or c++, i would type the answer according to what is displayed on the terminal and hit the enter key on my keyboard and the rest of the program will continue.
So how would I do this with a keypad which doesn't have an enter key??

Thank You!

EDIT: I would also like to know about how to connect the keypad with the arduino. As of now all the tutorials I have seen requires me to use the digital pins on the arduino for the keypad but the lcd also requires the digital pins. Is there a way to solve this problem?

3x4 keypads have seven data lines, 4 rows and 3 columns typically. If you scan one column at a time and use a pull-up resister on the four rows (you can use the internal pull-up for this), then you read the four bits and a bit is low, then that button is pressed. So a # key is usually row 4, col 3. So check if that is low, and perform the 'enter' function for your parser.

EDIT: I would also like to know about how to connect the keypad with the arduino. As of now all the tutorials I have seen requires me to use the digital pins on the arduino for the keypad but the lcd also requires the digital pins. Is there a way to solve this problem?

The analog pins can be used as digital pins. A 3x4 keypad, as wanderson points out, will require 7 pins, and there are only 6 analog pins. Hopefully, you have a spare digital pin.

If not, a serial LCD is in your future. Far fewer pins (one) than other LCDs.

You can't just remap the pins used? Almost all the arduino chips have quite a few digital pins. The megas have 50+. You're using ALL the digital pins on your board?

Thanks for the advice everyone and no I am not using a mega I have a mini 3.0. D2-D13 and A0-A7.
I have another question.
When defining a keymap using the keypad.h library can I define the keymap using ascii values in the character array or do I have to use normal characters??

When defining a keymap using the keypad.h library can I define the keymap using ascii values in the character array or do I have to use normal characters??

You can define that one character is returned when one key is pressed. Whether that character matches the value printed on the key, or not, is up to you.

Although, if there is not a match, you will have a code maintenance nightmare on your hands.

You have 2 choices - if you are able to tell the code readng the keypad what to return for each keypress then remap it there. This would also let you change the keypad mapping for different uses - say for now you need decimal entry, later in the prog you might need Hexadecimal entry...

when you look at the returned key value you have the choice of processing any key to do what you want at that time - just have your code process "#" as if it were the enter key.