Finding Keyboard Layout

Hello,
Is there any way that a script can query OS X to discover what keyboard layout is currently active (e.g., U.S. vs. Dvorak, or some other)?
And is it possible to find and examine whatever defines a particular keyboard layout? Something that would map each physical key on a keyboard to an ASCII code perhaps? I've found a number of files in the system library under "Keyboard layouts," all with the names of keyboards and .bundle extensions, but am not sure if these are what I'm looking for, or what sort of program might open them.
Thanks

'... find and examine whatever defines a particular keyboard layout? Something that would map each physical key on a keyboard to an ASCII code perhaps? ... or what sort of program might open them' - Use any text editor, including 'TextEdit', to view the desired '.keyboard' file of the respective '.bundle files' '/Contents/resources/' folder.
'Is there any way that a script can query OS X to discover what keyboard layout is currently active (e.g., U.S. vs. Dvorak, or some other)?' - Yes.
View the contents of the current users' 'com.apple.HIToolbox.x.plist' (where 'x' is the Macs' 'Mac address' [less the ':'s]). To view such with AppleScript utilize ...
do shell script ("defaults read /Users/y/Library/Preferences/ByHost/com.apple.HIToolbox.x")
... (where 'y' is the current users' name, for 'x' - see above) command.
For each 'AppleEnabledInputSources' Array Dictionary entry is an 'InputSourceKind' String, 'KeyboardLayout ID' Number, and 'KeyboardLayout Name' String.
For examaple, for 'Dvorak':
InputSourceKind String Keyboard Layout
KeyboardLayout ID Number 16300
KeyboardLayout Name String Dvorak

Similar Messages

  • Hello everyone, i need Mongolian keyboard layout, how can i find it, please help me, my pc is version OS X Yosemite, 10.10.2

    hello everyone, i need Mongolian keyboard layout, how can i find it, please help me, my pc is version OS X Yosemite, 10.10.2

    CLICKY CLICK---> Multilingual Mac

  • HT2587 Keyboard Layout Creator. Unfortunately I do not find any layout with the word "Apple" behind it out of the list.

    I was not able to find a specific keyboard layout with the following word "Apple" in parenthesis.
    Using Keyboard Layout Creator v1.4
    Did someone else?
    Thank you.

    All those layouts should work with Windows XP, Vista, 7 and 8...
    You get the parenthesis, the @ sign and other symbols exactly on the same key on OS X and Windows (see last 2 screen shots for the Swiss French layout).
    The only difference is that on Windows to "alt/option" you must either [ctrl] + [alt left] or [alt right].
    For a reminder if you want to toggle between "standard function keys" and "special features printed on each key" you can set this in "System Preferences > Keyboard" and "BootCamp Control Panel" respectively on OS X and Windows.
    French AZERTY keyboard : http://apple.lu/public/archives/akfr.zip
    Swiss French QWERTZ keyboard : http://apple.lu/public/archives/akswfr.zip
    You may change or create your own by downloading :
    http://msdn.microsoft.com/en-us/goglobal/bb964665.aspx
    http://support.apple.com/kb/HT5636?viewlocale=en_US (helping page by Apple)
    Keywords : BootCamp, VMWare, Parrallels, Virtual Box, ...

  • Finding a keyboard Layout

    Hello,
    i've been using PC computers but I switched recetly to Mac systems. I added (via system preferences) the arabic keyboard layouts (Arabic + Arabic Qwetry). However, both layouts are different from the standard PC keyboard which confuses me when typing in arabic and makes it hard for me to type in arabic very quickly.
    so is there any place I can find some arabic keyboard layouts to be installed on Mac?
    thanks

    The problem is that it is hard to me to learn another layout because I type without looking and my keyboard has only english letters writtin on it
    If you will tell me what corrections need to be made to the Arabic Windows I can try to fix it.
    Keyboard viewer only shows me available keyboard layouts without telling me how characters are organised in each layout
    It doesn't sound like you understand what Keyboard Viewer is yet. When you have the Input Menu in front of your in System Prefs/International, find the box next to Keyboard Viewer and check it. Then select Keyboard Viewer in the "flag" menu at the top right of the Finder. A virtual keyboard will appear on your screen, and its keys will change when you change the flag in the "flag" menu.

  • How can i disable Illustrator from changing my language / keyboard layout.

    I have an azerty laptop and a qwerty external keyboard. Switching from any application to illustrator changes the language and therefore also my keyboard layout. No other application does this.

    Thanks for the reply Mike
    But i have a laptop with azerty layout (Belgian) and an external qwerty keyboard (Brittish).
    So i need both languages selected in the System Pref >> Keyboard >> Input source
    When "Brittish" is selected and i switch from Apple Mail to Photoshop to Skype to Chrome to ... it all works fine.
    Only when i switch to Illustrator it also changes my language/layout from "Brittish" to "Belgian" and stays like that. I need to manually change it back in the menu in Finder.
    I like the brittish better (with a qwerty keyboard) because of the shortcuts (eg. sqare brackets -> shortcuts for order in Illustrator are not even on an azerty (Belgian) keyboard).
    Any idea?
    b.

  • Problem with Mail and customized keyboard layout

    I have created a customized keyboard layout in XML, it loads and works perfectly with all applications except Apple Mail. I noticed on a googlegroup that somebody has the same problem. How can I submit this Mail bug to Apple?

    download and run Find Any File to search for  "Antidote".
    FAF can search areas that Spotlight can't like invisible folders, system folders and packages. Any file you find will be in the search results window and can be dragged to the Desktop and then to the Trash bin.
    OT

  • How can I type "š" with english keyboard layout?

    I was wondering if somewho can tell me, how I can type "š" with englis keyboard layout, because when I have restart iMac, layout was changed back to english (from Slovak) and now I cant start Mac OS X, cause in my login is "š"

    Start with  the Apple menu in the upper left of the Menu Bar and select System Preferences. On the System Preferences pane on the top row is the UN flag icon. For Tiger (OS-X 10.4) it was called "International". Click to take you to the Language Options:
    The sub-menu called "Input Sources" (as you can see from the above screen shot) will take you to the panel that I referred to in the previous response. If you don't find your language listed then click on the "Edit List at the bottom left of the "Language" sub-menu. Once you make a change in either one of these places you will be given a notice to tell you that the change will be reflected the next time you restart your Mac or the next time that you log in to your account. If you are the only user and do not have another account on your Mac then the restart option will be your method. There is no need to do this procedure from the install DVD.

  • Does anyone know how to make an icon for a new keyboard layout?

    I have added a couple of keyboard layouts to my input sources and would dearly provide them with distinctive icons, but all icon makers I find on the net seem to cater to PCs only.

    Going to the App Store, there is a link for support.   That takes me to a facebook page:
    https://www.facebook.com/pages/Friendly-for-Netflix/
    Which when I lookup the info, takes me to:
    http://www.oecoway.com/
    Since there are no support links on the latter link, I would just message the owner of the Facebook page and tell them of your troubles.  If they are non-responsive, you may want to just as the App Store reverse the charge, with the feedback that the developer is non-responsive to user questions.  If it is functional for the $5 you paid, just keep it, and hope for an update you can use.

  • Keyboard layout problems in Gnome

    I'm not sure if it was a recent upgrade that did it or not, but in gnome my keyboard layout is only half right. I checked the keyboard manager in the gnome menu and it was set to Generic 105 key (INTEL).
    In xorg.conf the keyboard is listed as pc105. In KDE the keyboard works normally.

    bgodea wrote:I changed the Gnome keyboard layout to "104 key PC" and also tried changing my xorg.conf, but I still have the same problem. In non-graphical and KDE it works fine
    You also have to setup a valid layout for this kind of keyboard. That is done in the same dialog field. Then, what do you mean with "tried"? First off, if Gnome and X disagree about keyboard layout, Gnome complains loudly. Thus KDE is unilaterally setting the layout to something it likes. Check your Kconfig to find out what it is. Then find the section named InputDevice in /etc/X11/xorg.conf that looks something like this:
    Section "InputDevice"
    Identifier "Keyboard0"
    Driver "kbd"
    Option "XkbLayout" "us"
    Option "XkbRules" "xorg"
    Option "XkbModel" "pc104"
    EndSection
    Change it to resemble this example, if it doesn't. Check if your ServerLayout actually uses this InputDevice. Finally, is there anything else we should know about your keyboard? Do you run XGL/AIGLX?
    Last edited by Captain Spaulding (2007-04-03 16:50:46)

  • Custom keyboard layout and Gnome3

    After moving back to my native Sweden I find that the local keyboard is a pain to use for programming (mainly it's the locations of '{[]}' that are painful).  I'm stuck with Swedish keyboards at work, it's mostly laptops so using an external keyboard is not an ideal solution.  Currently my solution is to run the following script
    #! /bin/bash
    # load XKB, if there is one
    XKBDIR=${HOME}/.xkb
    XKBMAPFILE=${XKBDIR}/keymap/$(hostname)
    if [[ -f ${XKBMAPFILE} ]]; then
    xkbcomp -I${XKBDIR} ${XKBMAPFILE} ${DISPLAY} &> /dev/null
    fi
    and then put the desired layout changes under ~/.xkb/.  I've then created a .desktop and put it in ~/.config/autostart to run the script on login.  The only problem with this is that the changed layout doesn't survive putting the laptop to sleep or hibernating it.
    I'd love to get suggestions for better solutions, solutions that survive sleep/hibernate.

    But how can I edit this file to extract an Spanish.keylayout ?? And be able to create a custom keyboard layout ??
    Don't mess with those files. Just get Ukelele, it comes with copies of what you need:
    http://scripts.sil.org/cms/scripts/page.php?siteid=nrsi&itemid=ukelele
    What exactly are you trying to do? Some other info is
    http://m10lmac.blogspot.com/2007/02/more-ways-to-type-spanish.html
    http://m10lmac.blogspot.com/2007/04/typing-catalan.html

  • [LR2 - SOLUTION] Using Lightroom in englsih with a non-english keyboard layout

    Hi,<br /><br />Many of us, non native english speaking LR users, are using LT in<br />english on a system having a non-US keyboard layout. The conseqeunce of<br />this is that we can't reach a lot of keyboard shortcuts because LR<br />doesn't offer any interface for configuring them.<br /><br />However, there's a workaround. I'll explain here what I did for the<br />french language but you can apply this to your own language.<br /><br />For the non english languages, the keyboard shortcuts are defined in<br />C:\Program Files\Adobe\Adobe Photoshop Lightroom<br />2\Resources\<language>\TranslatedStrings.txt. If you are using LR in<br />english, this file is not used and there's no similar file in C:\Program<br />Files\Adobe\Adobe Photoshop Lightroom 2\Resources\en.<br /><br />But you can create one containing only the shortcuts that you need.<br /><br />I have created  a new TranslatedStrings.txt file containing only the<br />keyboard shortcuts defined for the french version. I did this by copying<br />only the lines containing the following sequences:<br /><br />....Key=...<br />....KeyShifted=...<br />...AgPanel/LeftPanelShortcut...<br />...AgPanel/RightPanelShortcut...<br />...MenuShortcut/DecreaseRating=<br />...MenuShortcut/IncreaseRating=<br /><br />(french users can find this file here:<br />http://www.mainsoft.fr/Files/LR/TranslatedStrings.txt .<br /><br />Copy this file to "C:\Program Files\Adobe\Adobe Photoshop Lightroom<br />2\Resources\en" and relaunch Lightroom.<br /><br />Now you have the same keyboard shortcuts as when using LR in french.<br />Interestingly enough, if you hit ctrl + < , the LR keyboard shortcut<br />panel is displayed and it shows your new shortcuts.<br /><br />Again, you can do the same for your own language by copying the<br />specified strings from the relevant folder.<br /><br />Hope this helps.<br /><br />-- <br />Patrick Philippot<br />MainSoft Consulting Services<br />www.mainsoft.fr

    Yes… I would at a minimum contact Apple sales or AppleCare regarding this. You have two options though. You can ask for a new one, given they can't simply swap out a keybaord you need to exchange the whole thing.
    Otherwise, you can use it as a bargaining chip and say ask for a free external International English keyboard and a discount on your next Apple Store purchase… for instance.
    Regardless, be polite yet firm with them as you did not get what you ordered.

  • Key "N" working as N+ALT when i have multiple keyboard layouts

    I have a weird issue ... I am using an apple aluminium keyboard with un-apple-keyboard, and remapped to act as a regular keyboard. I have used wiki article to achieve this: https://wiki.archlinux.org/index.php/Apple_Keyboard ...
    When I have only default EN keyboard layout installed, everything is fine, but when i add any additional layout (in my case Hungarian or/and Serbian) the key "N" starts to act kinda as ALT key... let me explain. when i press N it acts like i have pressed N and holding ALT... for example if i press n and f after it then i get this in console:
    N^[F
    this is very frustrating because as i type i often end up in a programs menu {ALT+* combinations} , or with some unwanted chars...
    I have tried many combination, but i could not solve the issue, so ANY idea/tip is welcome.
    Thanks in advance
    Last edited by bboldi (2012-09-17 09:11:39)

    Check out the "/usr/share/X11/xkb/symbols/" folder and edit whatever layout you're using (I'm guessing "rs"):
    $ ls /usr/share/X11/xkb/symbols/
    # nano /usr/share/X11/xkb/symbols/rs
    As you can see, there are more variants in there, so try another variant.
    If you have previously edited this file, maybe it will help to find out what package owns that file and reinstall it:
    $ pacman -Qo /usr/share/X11/xkb/symbols/rs
    /usr/share/X11/xkb/symbols/rs is owned by xkeyboard-config 2.6-1
    # pacman -S xkeyboard-config
    Note that the "N" key is awfully close to AltGr (the right-side Alt). Maybe it's a hardware issue? Apple peripherals are overpriced pieces of faeces (mice and headphones mostly. Don't know about the keyboard; I'd much rather buy something else in the same price range).

  • Keyboard layout changing question

    I use three different keyboard layouts: English, Spanish and Bulgarian. Back in Windows I added Spanish as a variant of English and used ctrl + shift to change English/Bulgarian and alt + shift to change English/Spanish. Now when I moved to linux I want to setup my layouts in a similar way. Is there any way to do it?

    Do you use gnome? If you do, you can just go to System>>Preferences>>Keyboard and click on the Layouts tab. You can then add layouts from there. In the Layout Options tab, under the Group Shift/Lock behaviour section, you can select how you want to be able to change groups.. But, I'm not sure if you can make it so that one sequence changes it from english to bulgarian and one changes it from english to spanish... I do know that you can have say alt+shift have it cycle through english, bulgarian, and english.. You can also right click on the panel, hit add to panel, find Keyboard Indicator, and hit add.. That will add a little thing that says what keyboard layout you are using, and you can just click on it to change to another one..
    If you don't use gnome I'm afraid I can't help you...
    Hope that helps
    majikstreet

  • [SOLVED] Awesome 3.5 using english keyboard layout instead of Xorg's

    Keyboard layout was OK on 3.4.
    For 3.5 and git version, Awesome defaults to english layout. Calling awesome.restart() (e.g. with SUPER+SHIFT+R) will correctly set the layout according to Xorg config. That's quite annoying indeed.
    Only Awesome is affected, i.e. all other applications will use the Xorg config. So basically the affected parts are
    * key bindings
    * Run command
    * Run lua code
    Using
    * up to date x86_64 system
    * blank user session
    * startx and 'exec awesome' as the sole command.
    I couldn't find any related issue on the web, seems strange to me since I shouldn't be the only one using a non-english keyboard layout !
    Any idea ?
    Last edited by Ambrevar (2013-08-02 20:01:32)

    Same here, but as with nomorewindows case, I just need to restart awesome, but I need to do it every time I boot. Both my console and X are configured to dvorak, but in X it's set through .xinitrc.
    I'm going to try and see whether putting
    echo "awesome.restart()" | awesome-client
    into my .xinitrc will help.
    By the way, my .xinitrc starts awesome in the following way:
    awesome & wmpid=$!
    [whole bunch of misery involving mpd, urxvt and setting the keymap in X]
    [above for restarting awesome]
    wait $wmpid

  • Ukelele generated custom keyboard layouts not working in Lion?

    I asked this question in the stackexchange site a few days ago.  Nothing I've tried has worked so far, except for creating a new account.  Because a fresh account works, it's got to be something with my preferences, right?
    http://apple.stackexchange.com/questions/21691/ukelele-generated-custom-keyboard -layouts-not-working-in-lion
    Here's the question from above:
    I created a custom keyboard layout with Ukelele (http://scripts.sil.org/ukelele) in Snow Leopard (idea is to generate scandinavian letters with Alt-key, otherwise have a pretty much standard U.S. layout). After the upgrade, the old installed (to ~/Library/Keyboard Layouts) layout wasn't working.
    Ukelele seems to work OK in Lion, but whether I put the generated keylayout in a bundle or single file, or save it "/Library/Keyboard Layouts" or "~/Library/Keyboard Layouts" doesn't seem to matter.
    Help?
    EDIT:
    @Sergio, I cannot choose the layout in Input Sources. One keylayout file I tried:http://semeai.org/~sjl/us-scands.keylayout
    [EDIT: Removed unrelated stuff]
    UPDATE 2011/08/15:
    @Tom:
    Copied your keylayout (it naturally ended up in my Junk folder):
    midgard (01:55) >ls -l ~/Library/Keyboard\ Layouts/MongolianQWERTY.keylayout-rw-r--r--@ 1 sjl  staff  44536 Mar 13  2008 /Users/sjl/Library/Keyboard Layouts/MongolianQWERTY.keylayout
    Logged out, logged in, isn't showing in Input sources (I'm looking very closely between "Maori" and "Myanmar - QWERTY").
    I've also uninstalled bunch of software and plugins giving suspicious messages to system.log, but hasn't helped.
    UPDATE 2011/08/16:
    I created a test account, and lo, the layout works perfectly for it. Also the bug in preferences doesn't show for that account. When trying this on my own account, there are no errors in Console logs with the suggested keywords (I can't seem to locate console.log file, though).
    UPDATE 2011/08/16 later:
    Nuking Library/Caches (and relogging) didn't help.
    UPDATE 2011/08/17:
    I did
    % find Library -name "*.plist" -exec mv {} {}.renamed \;
    and restarted, but it didn't help. I restored the situation with
    % for file in `find Library -name "*.plist.renamed"`; \  do mv "$file" "${file//.renamed/}"; done
    addendum: I also went through all the .plist files with plutil -s as described inhttp://www.askdavetaylor.com/can_i_check_my_plist_files_in_mac_os_x_for_problems .html. There was some brokennes, but in very unrelated applications.

    Tom,
    I think I love you.
    That absolutely did it! Thanks so much!
    If you'll answer with the same link in the stackexchange site, I'll mark the answer as correct, so you'll get the rep there.
    Thanks,
    Sami

Maybe you are looking for