hyper icon indicating copy to clipboard operation
hyper copied to clipboard

C-f works but C-M-f doesn't

Open erikkaplun opened this issue 2 years ago • 5 comments

on macOS, in all standard applications, terminal.app, spotlight, C-M-f goes forward by a word, C-M-b backwards, in Hyper, it does nothing. C-f, C-b, C-a, C-e seem to work fine.

if only the preferences pane would open so I could see if there is an option to enable Meta.

erikkaplun avatar Feb 23 '22 16:02 erikkaplun

Can you write these shortcuts in full? not sure what M is supposed to be here.

LabhanshAgrawal avatar Feb 24 '22 03:02 LabhanshAgrawal

C is Ctrl, M is Meta/Alt. but I assumed you knew. Under the prefpane of macOS standard Terminal.app, there is even a mention of the Meta key: image

The fact that macOS has basic Emacs keybindings built-in universally, also supports the C- and M- notation for talking about kb shortcuts.

erikkaplun avatar Mar 11 '22 10:03 erikkaplun

This much would have been enough.

C is Ctrl, M is Meta/Alt

There is no preference pane, the config file opens when you use the preference menu item or do cmd+, You can just use https://github.com/vercel/hyper/blob/f79006bae1e97532fd180a43c6146c1982ebff83/lib/config.d.ts#L48-L51 modifierKeys in your config if you need that option.

Anyways you can move forward and backward by using option+right or option+left or change the keybindings for them to anything else https://github.com/vercel/hyper/blob/fe5711871b22e3c4528653b863c54810c8c0b841/app/keymaps/darwin.json#L44-L45

LabhanshAgrawal avatar Mar 12 '22 12:03 LabhanshAgrawal

The point here is that macOS supports these keybindings out of the box, and this breaks in Hyper. All I’m saying is Hyper should have these keybindings by default, in order to match the standard (both GUI and terminal) behavior of macOS.

erikkaplun avatar Mar 16 '22 09:03 erikkaplun

I can't seem to get modifierKeys to work as described.

I want to use <M-i> within Neovim (or <A-i>) but I keep getting macOS's ^ key for adding accents to characters.

Example outputs of pressing <A-i> and then some other key to get the accented character:

ALT+I e => ê
ALT+i i => î

My ~/.hyper.js (snippet):

"use strict";
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
    config: {
        // choose either `'stable'` for receiving highly polished,
        // or `'canary'` for less polished but more frequent updates
        updateChannel: 'stable',
        //...snip
        macOptionSelectionMode: 'vertical',
        modifierKeys: {
            altIsMeta: true,
            cmdIsMeta: false,
        },
       //...snip
  }
}

I've saved the config, and restarted Hyper after each change to the config file, but it does not seem to change the mapping of the ALT/Option key.

Using: Hyper 3.2.3 (stable)

Possibly related issues:

  • https://github.com/vercel/hyper/issues/3825
  • https://github.com/vercel/hyper/issues/2902
  • https://github.com/vercel/hyper/issues/1361

cfurrow avatar Jun 20 '22 20:06 cfurrow