WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [Solved] How to modify keyboard shortcuts to use windows/super key in JWM?  (Read 6332 times)

Offline puppybyte!

  • Jr. Member
  • **
  • Posts: 91
I am using TC13 with JWM windowmanager, works well except I am used to windows key rather than alt key to launch a program.  Normally in JWM in other distros Alt (A) key can be substituted for windows key by (4).  Modifying the line   <Key mask="A" key="t">exec:aterm</Key>,  to  <Key mask="4" key="t">exec:aterm</Key> and rebooting does not work.  Anyone know a solution for this?
« Last Edit: March 07, 2022, 04:43:14 PM by Rich »

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 674
Re: [Solved] How to modify keyboard shortcuts to use windows/super key in JWM?
« Reply #1 on: February 28, 2022, 12:05:34 PM »
Did you forget to add the edited file to the file "/opt/.filetool.lst" and also forget to execute the "filetool -bv" to make a backup, so tc can copy over your edited file into correct location when booting.
 

Offline puppybyte!

  • Jr. Member
  • **
  • Posts: 91
Re: [Solved] How to modify keyboard shortcuts to use windows/super key in JWM?
« Reply #2 on: February 28, 2022, 07:11:47 PM »
my .filetool.lst already includes home, and .jwmrc-keys is within the home folder, right?, anyway but to make sure I added home/tc/.jwmrc-keys to the .filetool.lst, also made sure to backup with your suggestion of "filetool -bv" and rebooted.  After reboot superkey still does not work, and opening up the .jwmrc-keys the line  <Key mask="4" key="t">exec:aterm</Key> is there.  Any other thoughts? I appreciate the input.
« Last Edit: March 01, 2022, 05:45:35 PM by Rich »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10963
It may be a different key under tinyX vs Xorg. Use tools like xev to see what it is.
The only barriers that can stop you are the ones you create yourself.

Offline puppybyte!

  • Jr. Member
  • **
  • Posts: 91
It may be a different key under tinyX vs Xorg. Use tools like xev to see what it is.

not installed in TC13, no applications that match xdev...

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11226
Hi puppybyte!
It's  xev , not xdev. You can find it in  Xorg-7.7-bin.tcz:
http://tinycorelinux.net/13.x/x86/tcz/Xorg-7.7-bin.tcz.list

Offline puppybyte!

  • Jr. Member
  • **
  • Posts: 91
thanks, after xev, I get a small white window with a box,  I enter window key (on left lower keyboard), I get lots of output.  Is this correct or do I move the mouse cursor into the box on the white window and press window key???
« Last Edit: March 01, 2022, 05:44:59 PM by Rich »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11226
Hi puppybyte!
Try it like this to reduce the extra output:
Code: [Select]
xev -event keyboard
... do I move the mouse cursor into the box on the white window and press window key???
The white window only needs to have focus. The mouse cursor can be anywhere.
Press the Windows key and the information will be displayed.

Offline puppybyte!

  • Jr. Member
  • **
  • Posts: 91
after I press L lower windowkey I get the following

Code: [Select]
tc@box:~$ xev -event keyboard
Outer window is 0xa00001, inner window is 0xa00002

KeymapNotify event, serial 17, synthetic NO, window 0x0,
    keys:  48  0   0   0   16  0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

KeyRelease event, serial 23, synthetic NO, window 0xa00001,
    root 0x3a, subw 0x0, time 123654, (607,312), root:(651,388),
    state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
"   XLookupString gives 1 bytes: (0d) "
    XFilterEvent returns: False

KeyPress event, serial 25, synthetic NO, window 0xa00001,
    root 0x3a, subw 0x0, time 127965, (607,312), root:(651,388),
    state 0x0, keycode 133 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 1 bytes: (00) ""
    XmbLookupString gives 1 bytes: (00) ""
    XFilterEvent returns: False

KeyRelease event, serial 25, synthetic NO, window 0xa00001,
    root 0x3a, subw 0x0, time 128085, (607,312), root:(651,388),
    state 0x0, keycode 133 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 1 bytes: (00) ""
    XFilterEvent returns: False

Is the keycode 133 information I need?, now how do I get the keyboard to work with windows key in JWM window manager?
« Last Edit: March 01, 2022, 05:44:34 PM by Rich »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11226
Hi puppybyte!
I'm not sure, but you may not have something set up correctly. This is what I get when I press/release the left and
then right Windows key:
Code: [Select]
KeyPress event, serial 28, synthetic NO, window 0x2c00001,
    root 0x9f, subw 0x0, time 70866216, (474,812), root:(477,828),
    state 0x10, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x2c00001,
    root 0x9f, subw 0x0, time 70866368, (474,812), root:(477,828),
    state 0x50, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyPress event, serial 28, synthetic NO, window 0x2c00001,
    root 0x9f, subw 0x0, time 70870208, (474,812), root:(477,828),
    state 0x10, keycode 134 (keysym 0xffec, Super_R), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x2c00001,
    root 0x9f, subw 0x0, time 70870320, (474,812), root:(477,828),
    state 0x50, keycode 134 (keysym 0xffec, Super_R), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

Please do not quote posts in their entirety every time you respond.
If you wish to respond to a particular part of a previous post, only quote that part.

Offline puppybyte!

  • Jr. Member
  • **
  • Posts: 91
Hi puppybyte!
I'm not sure, but you may not have something set up correctly. This is what I get when I press/release the left and
then right Windows key:
Code: [Select]
KeyPress event, serial 28, synthetic NO, window 0x2c00001,
    root 0x9f, subw 0x0, time 70866216, (474,812), root:(477,828),
    state 0x10, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x2c00001,
    root 0x9f, subw 0x0, time 70866368, (474,812), root:(477,828),
    state 0x50, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

Isn't the left super keycode the same 133?, on my dell inspiron 6000, there is no right window key.
« Last Edit: March 02, 2022, 06:54:05 AM by Rich »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11226
Hi puppybyte!
The results you quoted are both for the left Windows key. The first one is for when the key is pressed, and the
second one is for when the key is released. If you look again at reply #9, you will see 2 more results. Those are
for when the right Windows key (keycode 134) was pressed and then released.

Offline puppybyte!

  • Jr. Member
  • **
  • Posts: 91
Hi puppybyte!
The results you quoted are both for the left Windows key. The first one is for when the key is pressed, and the
second one is for when the key is released. If you look again at reply #9, you will see 2 more results. Those are
for when the right Windows key (keycode 134) was pressed and then released.

Given the result of xev command, any chance I can modify windows key to replace Alt in JWM window manager

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11226
Hi puppybyte!
This is what your keyboard returned:
Code: [Select]
state 0x0, keycode 133 (keysym 0x0, NoSymbol), same_screen YES,
state 0x0, keycode 133 (keysym 0x0, NoSymbol), same_screen YES,
This is what my keyboard returned:
Code: [Select]
state 0x10, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
state 0x50, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,

It looks like your key has no keysym assigned. Try this:
Code: [Select]
xmodmap -e "keycode 133 = Super_L NoSymbol Super_L"Then run the  xev  command and see if the key says Super_L now.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11226
Hi puppybyte!
If this works for you and you want to make it permanent, this should work:
Code: [Select]
echo 'xmodmap -e "keycode 133 = Super_L NoSymbol Super_L"' > .X.d/LeftWinKeyPay close attention to the punctuation right after  Super_L.

Run a backup and reboot. Your key should still have the correct keysym.