Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 64905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T18:51:47+00:00 2026-05-10T18:51:47+00:00

When used in an AIR app, some standard keystrokes in OS X are either

  • 0

When used in an AIR app, some standard keystrokes in OS X are either ignored or produce ‘mystery’ characters rather than behaving as expected. Examples:

  • option + left arrow should move the caret one word backward, it prints a mystery character
  • ctrl + h should delete one character backward, it prints h

How do I support OS X default keystrokes (listed here: http://www.hcs.harvard.edu/~jrus/Site/System%20Bindings.html)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T18:51:48+00:00Added an answer on May 10, 2026 at 6:51 pm

    I have found some clues in the Webkit source to enable support in <mx:HTML> views, here: http://www.opensource.apple.com/darwinsource/10.5/WebCore-5523.10.3/editing/Editor.cpp

    And a clue with regards to Webkit’s expected syntax here: http://lists.macosforge.org/pipermail/webkit-unassigned/2007-May/038737.html

    Note this solution is incomplete, does not work in Flex/Flash components, and depends on Prototype:

    $(document).observe('dom:loaded', function() {     // Defined in AIR as !!NativeApplication.supportsDockIcon     if(window.Air.OperatingSystem == 'mac') {         var keyBindings = {             altKey: {                 // Up (should be 38)                 14: {                     dir: -1,                     gran: 'paragraph'                 },                 // Down (should be 40)                 15: {                     dir: 1,                     gran: 'paragraph'                 },                 // Left (should be 37)                 1: {                     dir: -1,                     gran: 'word'                 },                 // Right (should be 39)                 2: {                     dir: 1,                     gran: 'word'                 },                 // Backspace                 8: {                     dir: -1,                     gran: 'word',                     del: true                 },                 // Delete                 46: {                     dir: 1,                     gran: 'word',                     del: true                 }             },             ctrlKey: {                 // Left                 37: {                     dir: -1,                     gran: 'lineBoundary'                 },                 // Right                 39: {                     dir: 1,                     gran: 'lineBoundary'                 },                 // a                 65: {                     dir: -1,                     gran: 'paragraphBoundary'                 },                 // b                 66: {                     dir: -1,                     gran: 'character'                 },                 // d                 68: {                     dir: 1,                     gran: 'character',                     del: true                 },                 // e                 69: {                     dir: 1,                     gran: 'paragraphBoundary'                 },                 // f                 70: {                     dir: 1,                     gran: 'character'                 },                 // h                 72: {                     dir: -1,                     gran: 'character',                     del: true                 },                 // k                 75: {                     dir: 1,                     gran: 'paragraphBoundary',                     del: true                 },                 // n                 78: {                     dir: 1,                     gran: 'line'                 },                 // p                 80: {                     dir: -1,                     gran: 'line'                 }             }         };         $(document).observe('keydown', function(e) {             var target = e.element();             if(                 target.match('input') ||                 target.match('textarea') ||                 target.readAttribute('contenteditable') == 'true'             ) {                 if(                     (e.keyCode in keyBindings.altKey && e.altKey) ||                     (e.keyCode in keyBindings.ctrlKey && e.ctrlKey)                 ) {                     e.stop();                     var selection = window.getSelection();                     var keystroke = keyBindings[(e.altKey ? 'altKey' : 'ctrlKey')][e.keyCode];                     if(                         (e.keyCode != 8 && e.keyCode != 46) ||                         selection.isCollapsed                     ) {                         selection.modify(                             keystroke.del || e.shiftKey ?                                 'extend' :                                 'move',                             keystroke.dir == -1 ? 'backward' : keystroke.dir == 1 ? 'forward' : null,                             keystroke.gran                         );                     }                     if(keystroke.del && !selection.isCollapsed) {                         document.execCommand('delete', false, null);                     }                 }             }         });     } }); 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 73k
  • Answers 73k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer You probably want flush(). However, PHP may be using output… May 11, 2026 at 1:55 pm
  • added an answer The classic example that Joel Spolsky uses is on misuse… May 11, 2026 at 1:55 pm
  • added an answer Java is a much, much more mature platform, with a… May 11, 2026 at 1:55 pm

Related Questions

Is there any reason why JQuery would not work when used in an ASPX
What does the word literal mean when used in context such as literal strings
In C++, what is the purpose of the scope resolution operator when used without
I just wanted to compare different solutions used when implementing ACLs in Rails.
It seems that it is impossible to capture the keyboard event normally used for
Am coding an AIR 1.5 app in which I want to do a remote
Here is my problem - I'm trying to write a self-updating application, but I
The company that I work for develops a C++ application to manage service businesses

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.