0

I have been using to use a feature of ImageMagick 'Display' utility, namely, what is documented as Keyboard Accelerators.

Those are keybindings to various functionalities that are otherwise available on menus. As far as I can tell, they all work quite well, except the ones using Alt as a modifier key, except the Alt+<Arrow Key> to trim off pixels on the side of the image, which do work as documented.

On the other hand, the bindings using Meta (M-) work fine.

  • xev tells me that pressing the Alt key actually sends

state 0x0, keycode 64 (keysym 0xffe9, Alt_L)

  • xmodmap tells me that mod1 is mapped to Alt_L (0x40), Meta_L (0xcd)

I am not super familiar with the subtle technicalities of modifier keys handling. Moreover, as far as I can tell, a lot of it is 'software-related', especially regarding the Alt/Meta situation, and things happen at several levels (hardware, OS, individual softwares).

I have tried hacking a bit (not that much, I confess) with xmodmap to remap both Alt and Meta modifiers to different keys, and nothing has worked so far, though it is very likely that I was not completely aware of what I was doing and that there exists, in fact, a simple solution using xmodmap.

Is there a way to use display-im6's "keyboard accelerators" using Alt+key, while still having access to those using Meta as a modifier ? If possible, I would like to keep the current behaviour for other sofwares (that is, if the solution involves heavily remapping modifier keys to the point that other softwares are unable to work as before, it might be a problem ...) ?

Numbra
  • 620
  • 4
  • 8
  • The problem is likely the heavy use of the `Alt` by your desktop manager. In some cases it is possible to trick both your app and the DM by using `Alt`+`Ctrl` or `Alt`+`Shift`: the DM ignores the keystroke since the `Alt` is part of a combo and the app only tests the `Alt`. – xenoid Jan 11 '22 at 08:05
  • This is unlikely: I use i3, with the Mod4 ('windows key') key as a modifier. Hence, unless i3 does weird things to keyboard inputs, it should not intefere, as *all* my DM keybindings involve Mod4. (Moreover, it does not work: neither Shift + Alt nor Ctrl + Alt are correctly handled). – Numbra Jan 11 '22 at 08:31

0 Answers0