Send Command-C (or other key combination)

75 views
Skip to first unread message

Valentin Brosseau

unread,
Jan 2, 2015, 5:12:08 PM1/2/15
to ukelel...@googlegroups.com
Hi,

I'm trying to map the Atgr-Y (or whatever other key) to send the Command-C (or any other Command-key combination) shortcut. Is it possible on an osx keylayout file (its possible in XKB, but in OSX ?) ? 

Thanks by advance,

Sorin Paliga

unread,
Jan 2, 2015, 6:08:37 PM1/2/15
to ukelel...@googlegroups.com
Yes, but not with UKELELE, as you wish to modify system commands. Use either Karabiner (was KeyRemap4MacBook: http://www.macupdate.com/app/mac/25141/karabiner ) or DoubleCommand (http://www.macupdate.com/app/mac/12004/doublecommand )
Obviously, not both at the same time.
It is not clear to me what is your plan, in fact.
--
You received this message because you are subscribed to the Google Groups "Ukelele Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ukelele-user...@googlegroups.com.
To post to this group, send email to ukelel...@googlegroups.com.
Visit this group at http://groups.google.com/group/ukelele-users.
For more options, visit https://groups.google.com/d/optout.

Valentin Brosseau

unread,
Jan 2, 2015, 6:26:32 PM1/2/15
to ukelel...@googlegroups.com
Its exactly that kind of behaviour i want to mimic, but directly on the keylayout level. I want to distribute a keylayout file with some remap already done like

- Altgr-y -> Command-X 
- Altgr-x -> Command-C 
- Altgr-. ->  Command-V 

(For the record, my key disposition is a modification of the Bépo layout and the Command-{X,C,V} are note really simple to do…)

John Brownie

unread,
Jan 2, 2015, 6:43:50 PM1/2/15
to ukelel...@googlegroups.com
On 3/01/2015 10:26, Valentin Brosseau wrote:
> Its exactly that kind of behaviour i want to mimic, but directly on
> the keylayout level. I want to distribute a keylayout file with some
> remap already done like
>
> - Altgr-y -> Command-X
> - Altgr-x -> Command-C
> - Altgr-. -> Command-V
>
No, you can't do this with a keyboard layout. You can't make the system
think that the command key is down when it isn't.

John
--
John Brownie, john_b...@sil.org or j.br...@sil.org.pg
Summer Institute of Linguistics | Mussau-Emira language, Mussau Is.
Ukarumpa, Eastern Highlands Province | New Ireland Province
Papua New Guinea | Papua New Guinea

Valentin Brosseau

unread,
Jan 2, 2015, 6:59:34 PM1/2/15
to ukelel...@googlegroups.com
Damn :(. Keylayout file is less permissive than a xkb file apparently :(.

For the records that kind of behaviors are possible with xkb by doing :

key <AB02> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ y, Y, dead_abovering, dead_belowdot], actions=[NoAction(), NoAction(), Redirect(Key=<AB03>, clearmods=all, modifiers=Control), NoAction()] }

Sorin Paliga

unread,
Jan 3, 2015, 3:22:17 AM1/3/15
to ukelel...@googlegroups.com
Perhaps if you dig deeper into the system, you may change that. The default setting in OS X allow to modify the four modifier keys (sys prefs/keyboard), therefore any of them may be turned into another or to no function. This is what Karabiner or DoubleCommand do. Perhaps you should contact the creators of these app, as what you wish is very much like what these apps do.

Geke

unread,
Jan 3, 2015, 4:36:41 AM1/3/15
to ukelel...@googlegroups.com
Sorin, you’re a genius!
For Valentin: the OS is layered, and commands work at a more basic level than keyboard layouts, that’s why Ukelele can’t change the functions of the cursor keys, Enter, etc.
But if you use the System Preferences to swap the Command and Option keys, you can then give a command like Cmd-C by typing Option-C (or Alt-C on non-Apple keyboards).
Which keys (Y, X, .) produce which command can then be changed in Ukelele.

Still, this may not be what you want, because then both the Alt key and the AltGr key will function as the Command key. In principle, Ukelele lets you separate the left and right Command key tables, but in practice, I think most applications use only one of those two tables.

You forgot to write what you’re trying to accomplish: why is AltGr-Y easier/better for you than Cmd-X ?
Maybe your goal can be achieved by ways and means unknown to you...

Sorin Paliga

unread,
Jan 3, 2015, 4:39:37 AM1/3/15
to ukelel...@googlegroups.com
Oh, well… changing the four modifier keys is the basics of OS X. I guess it is most useful for those accustomed to the location of alt and ctrl keys, and are tempted to change their location when switching to OS X, as they are reversed on PC keyboards.

Geke

unread,
Jan 3, 2015, 4:50:24 AM1/3/15
to ukelel...@googlegroups.com
I think "genius" usually means: seeing how something in plain sight can solve an intractable problem. Anyway...

I’m not privy to why Apple put in those options, but for me they are most handy for the opposite reason: I’m used to Mac’s command key placement and want to have it the same on my non-Apple keyboard.

Op zaterdag 3 januari 2015 10:39:37 UTC+1 schreef Cattus Thraex:

Sorin Paliga

unread,
Jan 3, 2015, 5:45:59 AM1/3/15
to ukelel...@googlegroups.com
Oh yes, of course, it is most useful in this case, too.

Valentin Brosseau

unread,
Jan 3, 2015, 8:11:37 AM1/3/15
to ukelel...@googlegroups.com

So many reply… its will be easier to see the reason of my question after seeing my keyboard layout :

Thanks for your answer to all, i will keep my xkb version (for Linux) and i will use a external software to produce the same behaviours on OSX )

Geke

unread,
Jan 3, 2015, 8:57:14 AM1/3/15
to ukelel...@googlegroups.com
Right; a picture says more than 1000 words!
So:
1. You could start a keyboard layout on the basis of "Dvorak – Qwerty" (included with Ukelele) where a similar thing has been done.
2. And swap Option and Command keys in System Preferences

Only, as mentioned already, both the Alt and AltGr key will then work as Command key, so you’ll have to decide if that’s OK with you.
Good luck!

Sorin Paliga

unread,
Jan 3, 2015, 11:29:55 AM1/3/15
to ukelel...@googlegroups.com
Now I begin to understand what he needs: a Dvorak-based keylayout, and swapping modifier keys, he may get to the desired goal. 
@Valentin. How do you transfer linux xkb files to OS X? I remember an exchange of e-mail with a Linux expert in Russia, if now wrong, he planned to adapt my U.S. Academic keylayout (for linguists and dialecticians) to Linux. I do not know how he did that, and never specified whether he succeeded to do it.

Reply all
Reply to author
Forward
0 new messages