Altera Forum






Threads: 18,921
Posts: 77,324
Members: 29,164
Welcome to our newest member, rbn
User
Reputation
9135
7620
5891
4150
2930
2197
2056
1706
1388
1300




 
Register
Quick Search
 
  Altera Forums > Device and Tools Related > Quartus II and EDA Tools Discussion

Keyboard num lock scan code problem.

Reply
 
Thread Tools Display Modes
  #1  
Old March 11th, 2010, 06:23 AM
dante_t dante_t is offline
Altera Scholar
 
Join Date: Mar 2010
Posts: 34
Rep Power: 201
dante_t is on a distinguished road
Question Keyboard num lock scan code problem.

Hi, Ive got a problem with implement the scan codes for the case which num lock is on. i would like to use keypad 1-9 number on the keyboard as numbers, not as arrows, pg dn, pg up, etc.. the scan codes shown in easy scan.bmp shown below, i can easily implement. for example using the following process below because the scan codes are 8 bits long as shown here (example) easy scan.bmp

------------------------------------------------------------------
PROCESS (scan_code, ready_set)

BEGIN
IF (ready_set = '1') THEN
CASE scan_code IS


WHEN "00011100" => -- A
temp1 <="00011100";
data1 <= "1111001";
data0 <= "1000000";


WHEN "00110010" => -- B
temp1 <="00110010";
data1 <= "0100100";
data0 <= "1000000";


WHEN "00100001" => -- C
temp1 <="00100001";
data1 <= "0110000";
data0 <= "1000000";


WHEN "11110000" => -- break code

if temp1 ="00011100" then --A
data1 <= "1111001";
data0 <= "1000000";

ELSIF temp1 ="00110010" then --B
data1 <= "0100100";
data0 <= "1000000";

ELSIF temp1 ="00100001" then --C
data1 <= "0110000";
data0 <= "1000000";

ELSE
NULL;
END IF;

WHEN OTHERS => null;


END CASE;
END PROCESS;
--------------------------------------------------------------------

but the problem arises when i have to use the keypad numbers. the make and break codes for the keys are longer than 8 bits as shown here how scan.bmp

the reason why i want to use them as numbers, keypad 1(End), 2(Down), 3(Page Down), 4(Left), 6(Right), 7(Home), 8(Up), 9(Page Up) keys and keyboard's Home, Page up, Page down, End, Up, Down, Left & Right, share same scan codes when num lock is off. i really dont how to go about solving this problem (to write the process required). The complete keyboard code is attached. please help me out guys.

Regards
Dante
Attached Files
File Type: vhd KEYBOARD_2.vhd (5.8 KB, 4 views)
Reply With Quote
Reply



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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mouse / Keyboard John_P Quartus II and EDA Tools Discussion 4 February 10th, 2010 08:35 AM
PS/2 Controller Keyboard mafiaxii University Program 0 March 31st, 2009 07:35 PM
unable to scan device chain. cann't scan jtag chain srinathtummalapalli General Altera Discussion 16 October 21st, 2008 06:12 AM
Mouse/keyboard Inputs DBOi FPGA, Hardcopy, and CPLD Discussion 1 March 26th, 2008 01:45 AM
ps/2 mouse and keyboard Ankur Linux Forum 0 August 4th, 2006 08:00 AM


All times are GMT -8. The time now is 02:41 PM.