Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac install #2

Open
albert-ying opened this issue Oct 1, 2022 · 8 comments
Open

Mac install #2

albert-ying opened this issue Oct 1, 2022 · 8 comments

Comments

@albert-ying
Copy link

Is it possible to install on Mac?

@sunaku
Copy link
Owner

sunaku commented Oct 1, 2022

Yes, it should be possible according to this guide. Please try that and contribute the resulting keymap if successful. Thanks.

@albert-ying
Copy link
Author

albert-ying commented Oct 2, 2022

thanks! Interestingly, I came up with a very similar layout as yours before I found your repo. The only two differences are:

1: I swapped . and ,
2: I swapped = and \

curious what do you think

@sunaku
Copy link
Owner

sunaku commented Oct 2, 2022

Serendipity! 🤩 I'm happy to find a kindred spirit! 👋

Regarding your proposed key swaps, I think:

1: I swapped . and ,

This would also reverse the order of shifted characters on those keys (the <> angle brackets) to ><, which can be confusing. For instance, the Vim editor uses <> to decrease/increase the indentation level. Similarly, I have tmux shortcuts on ,. to navigate to the prev/next window, and on <> to move the current window's position in the window list to the left/right.

2: I swapped = and \

I would have to try this out and see how it feels. The current placement of [] square brackets and = equal sign are identical to that of the Dvorak layout, which I had typed in for 16 years prior, :neckbeard: so my muscle memory prefers the current placement. Moreover, = occurs more frequently than \ according to Xah Lee's analysis of Computer Languages Characters Frequency, so the current placement (which puts = closer to your pinky finger, making it easier to reach, than \) may be more economical.

@albert-ying
Copy link
Author

Thanks! It is a good point; I didn't think about vim's indent command at that time... I'm switching them back. But I still like -_ & =+ to be symmetrical. Good to know you also use vim! I guess we also choose engram for a similar reason: position of jkhl haha.

So are you fully switched to it now? how do you like it?

ps: I end up implementing it using Karabiner, but I use Esrille, a weird keyboard that doesn't match to Mac build-in. So wouldn't put it here.

And it took me 15min to type this haha

@sunaku
Copy link
Owner

sunaku commented Oct 14, 2022

Yes, that's quite interesting. 👍 I've noted its Vim friendliness in my learner's review of Engram, at binarybottle/engram#15.

I continue to use this Engrammer layout on laptop keyboards and I haven't looked back since switching over. On my desktop, I use a dedicated symbols layer on a programmable keyboard so Engrammer's deviation & symbol placement isn't so important.

@willpuckett
Copy link

I have been using Karabiner/karabiner.ts most of this year since I made the switch to Engram and later Engrammer. They work pretty well. Karabiner is not good at home row mods, though, and I really like having my laptop keyboard function pretty much the same as my mechanical keyboard.

Luckily, there's been some movement in the KMonad community lately. This gist details getting KMonad setup on Mac. It was pretty manageable, and then I made a launchd task to load it once I was comfortable with my config.

KMonad also runs on Windows and Linux, so it might be a nice option to recommend regardless of system. The configs are concise and easy to read, and it loads and runs exceptionally well (at least on Mac where I've been using it all week). I feel relieved: it's significantly faster and more natural to type on than any of the other Mac alternatives. All my home row mods work quickly and naturally with my nav layer, and I don't have to create huge convolutions of simlayers like with Karabiner/karabiner.ts. The only negative I can identify in Kmonad is its lack of bilateral combinations, although I've had surprisingly few mistypes. OK, well it's also not great at dealing with shifted keys (see the Shift Key Dillema), and so it a little easier to implement for Engrammer than Engram. I hope it will become the recommended way going forward.

Here's my config for Engrammer (with Home Row Mods and a slightly left shifted bottom row that makes my hand and shoulder feel way more natural on my laptop keyboard) in case anyone is interested:

(defcfg
  input (iokit-name "Apple Internal Keyboard / Trackpad")
  output (kext)
  fallthrough true
  allow-cmd false
  )

(defsrc
  grv  1    2    3    4    5    6    7    8    9    0    -    =    bspc
  tab  q    w    e    r    t    y    u    i    o    p    [    ]    \
  caps a    s    d    f    g    h    j    k    l    ;    '    ret
  lsft z    x    c    v    b    n    m    ,    .    /    rsft up
  fn   lctl lalt lmet           spc            rmet ralt left down rght
)

(defalias
    cc (tap-hold-next-release 200 c lctl)
    ai (tap-hold-next-release 200 i lalt)
    me (tap-hold-next-release 200 e lmet)
    sa (tap-hold-next-release 200 a lsft)
    sh (tap-hold-next-release 200 h rsft)
    mt (tap-hold-next-release 200 t rmet)
    as (tap-hold-next-release 200 s lalt)
    cn (tap-hold-next-release 200 n rctl)
    nav (tap-hold 180 caps (layer-toggle navigation))
    af #(spc \( \) spc = > spc )
    moi #(Y o u r spc N a m e )
)

(deflayer engram_homerow_mods
  grv  1    2    3    4    5    6    7    8    9    0    [    ]   bspc
  tab  b    y    o    u    '    ;    l    d    w    v    z    =     \
  @nav  @cc  @ai  @me   @sa   ,    .   @sh  @mt  @as   @cn   q    ret
  g    x    j    k    -   @af  /    r    m    f    p    rsft up
  fn  M-spc esc bspc           spc           ret  @moi left down rght
)

(deflayer navigation
  _    _    _    _    _    _    _    _    _    _    _    _    _    _
  _    _    _    _    _    _    _    home pgdn  pgup end    _    _    _
  _    _    _    _    _    _    _    left  down  up  rght    _    _
  _    _    _    _    _    _    M-S-z M-z  M-x   M-c    M-v    _    _
  _  _    _    _              _              _    _    _    _    _
)

;; (deflayer blank
;;   _    _    _    _    _    _    _    _    _    _    _    _    _    _
;;   _    _    _    _    _    _    _    _    _    _    _    _    _    _
;;   _    _    _    _    _    _    _    _    _    _    _    _    _
;;   _    _    _    _    _    _    _    _    _    _    _    _    _
;;   _    _    _    _              _              _    _    _    _    _
;; )

And the launchctl job:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http:https://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Label</key>
	<string>kmonad</string>
	<key>Program</key>
	<string>/Usr/bin/sudo</string>
	<key>ProgramArguments</key>
	<array>
		<string>sudo /Users/YOU/.local/bin/kmond</string>
		<string>/Users/YOU/.local/bin/kmonad</string>
		<string>/Users/YOU/.local/config/engram.kbd</string>
	</array>
	<key>RunAtLoad</key>
	<true/>
	<key>StandardErrorPath</key>
	<string>/tmp/kmonad.stderr</string>
	<key>StandardOutPath</key>
	<string>/tmp/kmonad.stdout</string>
</dict>
</plist>

@shanekunz
Copy link

I created a .dmg using Ukelele with the .keylayout file and a small .app you can use to install it. You could also install the .keylayout by loading it into Ukelele. It shows up here for me.
image
image

I haven't tested it all that much, but I'm typing this with the layout right now and so far so good. I made the layout with a M1 Macbook Pro keyboard, though I doubt which Mac you have matters much. Ukelele itself seems really flexible if you wanted to experiment with other mappings and key modifiers, but as others mentioned KMonad might be a better solution, at the very least for cross OS support. I plan on checking that out eventually next time I install/use linux.

Side note: I highly recommend Type Fu if your looking to learn this layout. I used typing cat to learn Dvorak, but last I checked there was no way to create a custom layout for a currently more niche layout like Engrammer. I could not imagine learning any layout without a program like that to assist me.

I'm attaching it as a google drive file because GitHub only allows certain file types in comments. (lame considering repos seem to allow all file types)

https://drive.google.com/file/d/1uL-EgCm2Gx8zD-PgUswMNi4od-RRVjc6/view?usp=sharing

@eugeny-dementev
Copy link
Contributor

@sunaku I assume that issue should be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants