Separate base layer for control keys?

23 views
Skip to first unread message

Alexey Trofimenko

unread,
Jul 30, 2025, 12:11:28 AMJul 30
to Ukelele Users
Hi.

On english qwerty layout I'm using ctrl+a, b, f, e, n, p emacs-style keys instead of arrows (which are small and not very handy on laptop), when possible. It not only works in the terminal, but in most GUI apps. Something in Cocoa framework, I believe, from the early days of OS X, added by some unix nerd. It does even have a separate yank clipboard for ctrl+k/ctrl+y!.

The trouble is, it doesn't work with "Russian - PC" (or a standard "Russian") layout. Unlike, for example, Command+keys, which still generate QWERTY variants. For example, cmd+т and cmd+n are the same, but сtrl+т generates something different from ctrl+n.

And separate ctrl+russian keys are absolutely useless, no app uses them anyway.

When I try to modify Russian - PC layout in ukulele, though, it shows the same ^ plane as in standard qwerty, "modifier set 7", the same U+00, U+01 etc. keys as in English.

And if I try to create layout from scratch, there are "Base keyboard layout", "layout with command key", "layout with caps lock key", but no option for "layout with control key". But those are not special flags for layout but just prefilled keyboard codes on specific modifier sets, right?

Can I make "control+" keys behave the same as "command+" and temporarily change to qwerty layout? Or is it something fundamental in Cocoa which ignores or changes internally layouts for control keys somehow.

Thanks!

Gé van Gasteren

unread,
Jul 30, 2025, 2:55:39 AMJul 30
to ukelel...@googlegroups.com
I’ll leave this for John to "really" answer, but know that you’re working on the fringes of what is possible with macOS keyboard layouts. 

Many apps intercept combinations with the Control key, so they don’t even arrive at the layer where the keyboard layout is called to produce some output.
Have a look in section 9.9 (page 80) of the PDF manual, which is available on Ukelele’s Help menu.
It’s the very last section before the manual proper, for a good reason…

Maybe you would be better off with a background keyboard monitor+substitution app like Karabiner.

--
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 view this discussion visit https://groups.google.com/d/msgid/ukelele-users/d19438ae-d3cf-4c93-8ac4-1867b60378b3n%40googlegroups.com.

Alexey Trofimenko

unread,
Aug 2, 2025, 4:30:45 AMAug 2
to Ukelele Users
many thanks, it actually worked! for russian layout I've put that in my ~/Library/KeyBindings/DefaultKeyBinding.dict as a start

{
  // function list:
  //   https://developer.apple.com/documentation/appkit/nsstandardkeybindingresponding
  // for default keybindings consult:
  //   plutil -convert swift /System/Library/Frameworks/AppKit.framework/Resources/StandardKeyBinding.dict -o StandardKeyBinding.swift

  "^ф" = "moveToBeginningOfParagraph:";
  "^Ф" = "moveToBeginningOfParagraphAndModifySelection:";
  "^и" = "moveBackward:";
  "^И" = "moveBackwardAndModifySelection:";
  "^в" = "deleteForward:";
  "^у" = "moveToEndOfParagraph:";
  "^У" = "moveToEndOfParagraphAndModifySelection:";
  "^а" = "moveForward:";
  "^А" = "moveForwardAndModifySelection:";
  "^р" = "deleteBackward:";
  "^л" = "deleteToEndOfParagraph:";
  "^д" = "centerSelectionInVisibleArea:";
  "^т" = "moveDown:";
  "^Т" = "moveDownAndModifySelection:";
  "^щ" = (insertNewlineIgnoringFieldEditor:, moveBackward:);
  "^з" = "moveUp:";
  "^З" = "moveUpAndModifySelection:";
  "^е" = "transpose:";
  "^м" = "pageDown:";
  "^М" = "pageDownAndModifySelection:";
  "^н" = "yank:";

  "~^и" = "moveWordBackward:";
  "~^И" = "moveWordBackwardAndModifySelection:";
  "~^а" = "moveWordForward:";
  "~^А" = "moveWordForwardAndModifySelection:";
}

Gé van Gasteren

unread,
Aug 2, 2025, 9:48:14 AMAug 2
to ukelel...@googlegroups.com
On Sat, Aug 2, 2025 at 10:30 AM Alexey Trofimenko <aron...@gmail.com> wrote:
many thanks, it actually worked! for russian layout I've put that in my ~/Library/KeyBindings/DefaultKeyBinding.dict as a start

Glad it worked!
Although I’m not sure what that "it" is about…

John will be happy that the work he put into the manual was actually used :-)
Reply all
Reply to author
Forward
0 new messages