- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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) https://www.alteraforum.com/forum/attachment.php?attachmentid=2161
------------------------------------------------------------------ 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 https://www.alteraforum.com/forum/attachment.php?attachmentid=2162 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 DanteLink Copied
0 Replies

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page