SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    $books++ == true matsko's Avatar
    Join Date
    Sep 2004
    Location
    Toronto
    Posts
    795
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Browser + Keyboard Code Consistency

    Just a quick question about keyboard charCodes and browsers.

    I've created a Mootools input and textarea that allows for a variety of allowed keys (up, down, left, right, home, end, delete, backspace, space, shift, cntrl, tab, caps lock and alt). Basically what happens if anyone of these keys is pressed all is fine, but if something else is pressed then the character representation of that key is fetched (via the char code) and then if that character is suitable (alphabetical, numeric, or alphanumeric) then its allowed to be inputted.

    This works on IE6 and 7, Firefox, Safari and Opera, but what I'm wondering is that does it work consistently across operating systems and different keyboards? Are the charcodes consistent from OS to OS?
    I can't believe I ate the whole thing

  2. #2
    SitePoint Addict
    Join Date
    Dec 2007
    Posts
    358
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    > Are the charcodes consistent from OS to OS?
    I've never heard about any exception so I suppose that the answer is Yes. Charcode is an order number of the character in specific encoding and encoding is not OS-specific thing.
    I'm creating trouble-free Apache, PHP, MySQL installer, WITSuite,
    and use it to setup my development environment.
    Demo, support, contact. Questions?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •