Connect with us

Trying to make a custom keyboard and require help

Discussion in 'General Electronics Discussion' started by anj17, Dec 24, 2012.

Scroll to continue with content
  1. anj17

    anj17

    4
    0
    Dec 24, 2012
    Hello all,
    As the title suggests I am trying to make a custom keyboard for myself but the problem is that I have no idea where to start. I looked around the internet and found that matrix is the way to go when doing this but I am wondering if any IC will have enough ports for that many keys. Also how do I make my pc be able to interact with this keyboard?

    Thank you!
     
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,496
    2,837
    Jan 21, 2010
    The easiest way is to get an existing keyboard and simply wire up a custom set of keys to the controller. You'll have to find out how the key matrix is wired, but that shouldn't be too hard.

    You can almost certainly get an entire keyboard cheaper than you can buy the parts used for the controller.
     
  3. Raven Luni

    Raven Luni

    798
    8
    Oct 15, 2011
    Agreed. I'm planning on doing this to make a mini keyboard for my rasbery pi. They tend to be connected in a column / row matrix but with modern ones there might be an extra dimension or 2 to accomodate the number of keys. The last time I worked with a keyboard matrix was on the ZX Spectrum :p That was 1 colum and 1 row (actually arranged in half rows) - so basically split into groups kind of resembling columns and rows :p
     
  4. anj17

    anj17

    4
    0
    Dec 24, 2012
    I agree and actually that is what I planned earlier but that wont work. This is because I will have extra keys that I have yet to see on a regular keyboard and also the keyboard will be shaped differently. which is why I wanted to start from scratch.
    Thank you
     
  5. CocaCola

    CocaCola

    3,635
    5
    Apr 7, 2012
    If you have 'extra' keys that are not part of the USB HiD standard you will need to write your own new USB interface standard or write your own drivers unless they are just macros of the existing keys and then you can just macro them as they are not unique they are just macros of existing keys...

    Most USB systems will only support the standard 104 key keyboard plus the optional 'Windows' function keys, these map out to the first 256 definitions in the HiD Usage Table... Some regional USB systems will support a few more keys, but beyond that your device will really become a custom interface not a keyboard under the defined standards and that really complicates the build...

    Shape is irrelevant to mapping/copying the matrix used on an existing keyboard...
     
  6. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,496
    2,837
    Jan 21, 2010
    You can wire up the keys in any shape you like. In fact, you can place them anywhere on the matrix that you want to as it is the driver for the keyboard which converts scan codes to keys.

    However in a practical sense, it is sensible to wire keys up as close as possible to the original so that the scan codes can be decoded by the default driver.

    I'm not sure what you mean by "keys you have yet to see", but I assume you mean keys that will perform some customized function.

    In this case it would be easier to start from a keyboard that has an option for customisable keys and wire your special keys into corresponding parts of the matrix.
     
  7. anj17

    anj17

    4
    0
    Dec 24, 2012
    When I said extra keys I meant printing out characters such as greek alphabets that are used in physics, and some macro keys such as ctrl+N. I understand that macro wont be a problem but will the greek alphabets be?
     
  8. CocaCola

    CocaCola

    3,635
    5
    Apr 7, 2012
    You are dealing with two different things swapping character sets is not really the same as extra keys... Swapping character sets is handled by the OS or the software running on the PC not the keyboard per se that is unless you limit it to the special characters in the extended ASCII chart for whatever character set you are using... If you are simply using the extended ASCII characters they are simply macros, for example if you want the Omega 'letter' hold Alt 234 and presto Ω or make a macro that does the same and map it to a single key on your keyboard...
     
    Last edited: Dec 26, 2012
  9. anj17

    anj17

    4
    0
    Dec 24, 2012
    Ah I see. So essentially everything beyond the regular keys can be macros. Thank you all for the help. And also I found this teensy usb development board which can be interfaced with the arduino. So I will be using that and programming wont be a problem in that scenario.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-