Keymap.cson cannot assign hyper or alt_r


#1

I assigned my capslock as a hyper key so I could create a few easy keybindings. Atom doesn’t appear to recognise these key options though.

so for example this setting as a snippet expansion.

'atom-text-editor:not([mini])':
  'hyper_l': 'snippets:expand'

or

'atom-text-editor:not([mini])':
  'Hyper_L': 'snippets:expand'

neither work, also tried with alt_r

Tested my keys to ensure they worked and xev responded positively. Is there a way to enable unqiue keybinds?

KeyRelease event, serial 36, synthetic NO, window 0x2a00001,
    root 0x2d9, subw 0x0, time 1760518, (246,-49), root:(247,514),
    state 0x50, keycode 66 (keysym 0xffed, Hyper_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

#2

Different keys in a keybinding are seperated by a hyphen (-), not an underscore (_). So it should be

'atom-text-editor:not([mini])':
  'hyper-l': 'snippets:expand'

But I don’t know if the hyper key is supported, I’ve never heard of it


#3

The original “space-cadet” keyboard had names that are sometimes used as OS-agnostic names for the various keys:

  • Shift
  • Control
  • Meta — Often refers to the Alt or Option key
  • Super — Often refers to the Windows or Command key
  • Hyper — If supported, typically refers to the Menu or Fn key

Sometimes the Meta and Super keys are reversed in the way the keyboard is constructed, though not in how the keys are used.


Atom on chromebook (was: Let's talk ChromeOS) [RESOLVED]
#4

Also, if you’re meaning alt_r as the Right Alt or AltGr key, it is generally not supported right now:


#5

It’s kinda cool that this one doesn’t have cursor keys, nor a Caps Lock key.


#6

He didn’t mean to type Hyper (the modifier) plus L (the letter). He meant to type the left Hyper key.


#7

I think normally it doesn’t work that way. Normally, I would expect Hyper_L and Hyper_R to be modifier keys (like Shift and Control), and I guess the system expects them to be set up as such. If you want that key to do something different, perhaps you can assign a function key to it. I think X11 can go up to F35, or is it only F24 – in any case that should be plenty.

xmodmap -pm prints the modifier map. If Hyper_L is mentioned there then now you know why it’s not working.


#8

[sayth@localhost ~] $ xmodmap -pm
xmodmap: up to 5 keys per modifier, (keycodes in parentheses):

shift Shift_L (0x32), Shift_R (0x3e)
lock
control Control_L (0x25), Control_R (0x69)
mod1 Alt_L (0x40), Alt_R (0x6c), Meta_L (0xcd)
mod2 Num_Lock (0x4d)
mod3
mod4 Hyper_L (0x42), Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf)
mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)

In Gnome 3.10+ so Ubuntu and Fedora there is an advanced settings option that allows you to change many modifiers for caps and other keys.


#9

Sorry I’m dense – have you solved your issue now or are there open items?


#10

I use Hyper key in emacs.
Before you can assign a Hyper key , it is the top priority is to set a modifier key , such as the following .

emacs Similarly , I want to use the Hyper key as an independent modifier key in ATOM.
I replace menu-key to hyper-key.

my customized modifier
shift Shift_L (0x32), Shift_R (0x3e)_
lock Eisu_toggle (0x42)(=CapsLock)
control Control_L (0x25), Control_R (0x69)

mod1 Alt_L (0x40), Alt_R (0x6c), Meta_L (0xcd)_
mod2 Num_Lock (0x4d)_
mod3 Hyper_L (0x66), Hyper_R (0x87), Hyper_L (0xcf)_
mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce)_
mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)_

normal ubuntu 16.04
shift Shift_L (0x32), Shift_R (0x3e)_
lock Eisu_toggle (0x42)_
control Control_L (0x25), Control_R (0x69)_
mod1 Alt_L (0x40), Alt_R (0x6c), Meta_L (0xcd)_
mod2 Num_Lock (0x4d)_
mod3
mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf)_
mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)_

Eisu_toggle = almost Caps lock in Japanese keyboard

Setting in , I use the xkb and xmodmap now.
I think , Do not use GUI tools(gnome,mate,cinnamon etc).