You are not logged in.

#1 2024-02-01 23:23:52

Mantoba
Member
Registered: 2024-01-21
Posts: 17

Trying to remap shift-insert with Xmodmap.

I'm having a problem changing the shift-insert key combo to another set of keys.

I installed and ran xev, and found the following for shift-insert:

KeyPress event, serial 36, synthetic NO, window 0x1e00001,
    root 0x57e, subw 0x0, time 92649803, (-1,53), root:(498,77),
    state 0x1, keycode 118 (keysym 0xff63, Insert), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

Says that the insert key is keycode 118.  When I enter my Xmodmap file and go to keycode 118, it lists the following:

keycode 118 = Insert NoSymbol Insert

My understanding of Xmodmap layout is:

Each keysym column in the table corresponds to a particular combination of modifier keys:
 1.   Key
 2.   Shift+Key
 3.   Mode_switch+Key
 4.   Mode_switch+Shift+Key
 5.   ISO_Level3_Shift+Key
 6.   ISO_Level3_Shift+Shift+Key

That means the second symbol is the shift-insert combo.  How can it be listed as NoSymbol?!?  How can I change the location of shift-insert?

I need to do this because with my current, needed, setup I would have to use the keycombo Fn-shift-insert, and it's just bloody awkward.

Offline

#2 2024-02-02 15:19:31

Mantoba
Member
Registered: 2024-01-21
Posts: 17

Re: Trying to remap shift-insert with Xmodmap.

OK, can someone possibly clue me in to where shift-insert would be applied?

Offline

#3 2024-02-02 15:25:28

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,460
Website

Re: Trying to remap shift-insert with Xmodmap.

What do you mean by "applied"?  Many programs respond to shift+insert by pasting the primary selection.  But this is done by each individual program.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2024-02-02 16:30:16

Mantoba
Member
Registered: 2024-01-21
Posts: 17

Re: Trying to remap shift-insert with Xmodmap.

Trilby wrote:

What do you mean by "applied"?  Many programs respond to shift+insert by pasting the primary selection.  But this is done by each individual program.

So you're saying I can't change this?

Offline

#5 2024-02-02 16:54:41

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,460
Website

Re: Trying to remap shift-insert with Xmodmap.

I'm saying I don't know what you are referring to yet - so I certainly can't tell you whether you can change it, let alone how.  Is Xmodmap actually relevant here, or was that just something you thought would help achieve your goal (i.e., and X-Y problem)?

Please describe your actual goal and how the current behavior of the system differs from that goal.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2024-02-02 18:55:59

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,034

Re: Trying to remap shift-insert with Xmodmap.

Ignore the shift part, you want to remap the insert key (which I assume you need to press Fn in order to reach), the shift part is encoded in the state (0x1) and the clients will look at that.
The insert key generates Insert on all layers and that (along the modifier) is what the clients respond to.

Offline

#7 2024-02-02 19:19:32

Mantoba
Member
Registered: 2024-01-21
Posts: 17

Re: Trying to remap shift-insert with Xmodmap.

seth wrote:

Ignore the shift part, you want to remap the insert key (which I assume you need to press Fn in order to reach), the shift part is encoded in the state (0x1) and the clients will look at that.
The insert key generates Insert on all layers and that (along the modifier) is what the clients respond to.

Ahh, I see.  So instead of going lower, I need to go higher.  Hence the NoSymbol on the lower levels and the comment:

Trilby wrote:

But this is done by each individual program.

So I should be doing this at the WM level.  I'll give that a try.

Offline

#8 2024-02-02 22:25:05

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,034

Re: Trying to remap shift-insert with Xmodmap.

So I should be doing this at the WM level.

No. The WM has absolutely nothing to do with that.
Figure the keycode of the key you want to use as Insert and map Insert there.

Offline

#9 2024-02-03 04:46:17

Mantoba
Member
Registered: 2024-01-21
Posts: 17

Re: Trying to remap shift-insert with Xmodmap.

seth wrote:

So I should be doing this at the WM level.

No. The WM has absolutely nothing to do with that.
Figure the keycode of the key you want to use as Insert and map Insert there.

Ok, then you've lost me.

The key I want to move is shift-insert.  The keymap of Xmodmap says the insert key code is 118.  And the second entry of key code 118:

Each keysym column in the table corresponds to a particular combination of modifier keys:
 2.   Shift+Key
keycode 118 = Insert [b]NoSymbol[b] Insert

But the second column is NoSymbol.  I can't remap NoSymbol and have it mean the same thing.

Moving it did nothing.

Offline

#10 2024-02-03 08:59:45

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,034

Re: Trying to remap shift-insert with Xmodmap.

118 is the keycode of the regular insert key, but afaiu you've to use the Fn key to use it?
Which keycode do you *instead* want to use as Insert?

Run

xev -event keyboard

press the key you desire to use as Insert and post the output.

Offline

#11 2024-02-04 17:14:55

Mantoba
Member
Registered: 2024-01-21
Posts: 17

Re: Trying to remap shift-insert with Xmodmap.

I feel the mention of the Fn key is confusing you.

Fn is not used, and this post was so that I never have to use Fn.  But I am making my F-keys the default.  Which means to use shift-insert, I would need to include the Fn key.  So I am moving my shift-insert to super_L-v, hopefully.

Here is my output for the new key:

KeyPress event, serial 28, synthetic NO, window 0x1e00001,
    root 0x57e, subw 0x0, time 1803168, (28,108), root:(767,132),
    state 0x40, keycode 55 (keysym 0x76, v), same_screen YES,
    XLookupString gives 1 bytes: (76) "v"
    XmbLookupString gives 1 bytes: (76) "v"
    XFilterEvent returns: False

My original thought was to move the symbol for shift-insert to super_L-v but I can't move 'NoSymbol' and have it mean something.

Offline

#12 2024-02-04 17:29:48

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,034

Re: Trying to remap shift-insert with Xmodmap.

So I am moving my shift-insert to super_L-v, hopefully.

No. At least not this way.
You could bind super+v to an xdotool shortcut the fires "xdotool key Shift+Insert", but xmodmap or xkb won't get you this at all. They manipulate the keymap (so you could make your caps lock act as Insert) but not the client response to a shortcut.

Offline

Board footer

Powered by FluxBB