WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: flwm shortcut keys  (Read 3893 times)

Offline mbertrand

  • Full Member
  • ***
  • Posts: 225
flwm shortcut keys
« on: May 12, 2014, 01:34:22 PM »
I'm using TinyCore with default windows manager. I have an application that relies on 'ALT-UP_ARROW' and 'ALT-DOWN_ARROW' key combination. I never receive these shortcut keys like there being gobbled up by the window manager. Is there any way of configuring this? How to stop window manager from using these keys. You would think that it should not discard them?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11624
Re: flwm shortcut keys
« Reply #1 on: May 12, 2014, 02:14:20 PM »
Hi mbertrand
I just tried those key combinations under flwm_topside and they move the window that has focus to the front/rear of the display stack.
Try it with two overlapping windows to see.

Offline mbertrand

  • Full Member
  • ***
  • Posts: 225
Re: flwm shortcut keys
« Reply #2 on: May 12, 2014, 02:20:35 PM »
Yes I know and that's my problem. My application is not receiving ALT-UP_ARROW. Could it be that it is being discarded by windows manager after it has used it?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11624
Re: flwm shortcut keys
« Reply #3 on: May 12, 2014, 02:29:35 PM »
Hi mbertrand
Quote
Yes I know and that's my problem.
The way you stated the question made it sound like you didn't know what those key combinations did.
Quote
Could it be that it is being discarded by windows manager after it has used it?
That's exactly what is happening. The source package has config file for enabling/disabling various features of flwm, though I don't know
if that's one of the features.

Offline mbertrand

  • Full Member
  • ***
  • Posts: 225
Re: flwm shortcut keys
« Reply #4 on: May 12, 2014, 02:32:22 PM »
I don't want to compile so now I'm looking into 'actkbd' . Does this make sense to you?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11624
Re: flwm shortcut keys
« Reply #5 on: May 12, 2014, 02:43:35 PM »
Hi mbertrand
I think that package is only for assigning commands you would enter at a terminal to a key combination.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: flwm shortcut keys
« Reply #6 on: May 12, 2014, 03:03:20 PM »
You need to use another WM.
The only barriers that can stop you are the ones you create yourself.

Offline mbertrand

  • Full Member
  • ***
  • Posts: 225
Re: flwm shortcut keys
« Reply #7 on: May 12, 2014, 04:14:15 PM »
would using 'actkbd' to map this key combination to some other key combination not used and then I could write my code to use this new code instead. I think its possible to have actkbd to send keys no?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: flwm shortcut keys
« Reply #8 on: May 13, 2014, 10:52:45 AM »
That would be a hack, and many times more complex than just changing the WM (or alternatively, changing your app to use other keys).
The only barriers that can stop you are the ones you create yourself.

Offline mbertrand

  • Full Member
  • ***
  • Posts: 225
Re: flwm shortcut keys
« Reply #9 on: May 13, 2014, 11:51:44 AM »
I agree it's just that this is an industrial computer with no keyboard and has a turning knob and couple of buttons. I don't have a choice to react to keycode 64 (ALT) with knob movement. We need to support existing units already in the field that will get our new software. If I could change the scancode that kernel get to lets say CTRL instead of ALT then I could write my code for CTRL instead.
I there not a way to change mapping of scancode/key code?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: flwm shortcut keys
« Reply #10 on: May 13, 2014, 12:02:09 PM »
Certainly there is, see xmodmap.
The only barriers that can stop you are the ones you create yourself.

Offline mbertrand

  • Full Member
  • ***
  • Posts: 225
Re: flwm shortcut keys
« Reply #11 on: May 13, 2014, 12:54:51 PM »
I've been looking at that all morning and it does not seem to do what I want. Can I do something like make my ALT key be a CTRL key.
I don't want CTRL key to generate the ALT key. I want when user presses the ALT+UP-ARROW I get CTRL+UP-ARROW. Is this possible with xmodmap? I'm now looking at setkeycodes?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11624
Re: flwm shortcut keys
« Reply #12 on: May 13, 2014, 01:06:57 PM »
Hi mbertrand
Googling for:
linux swap alt and ctrl keys
gives a lot of hits.

Offline mbertrand

  • Full Member
  • ***
  • Posts: 225
Re: flwm shortcut keys
« Reply #13 on: May 13, 2014, 01:34:57 PM »
Swapping keys on a keyboard is not what I need. I have on physical button and it generates the ALT scancode=0x38 with keycode=56.
I want to remap this scancode to a different keycode like CTRL keycode=29. That way when user presses that button it will generate keycode 29 instead of 56.

Offline mbertrand

  • Full Member
  • ***
  • Posts: 225
Re: flwm shortcut keys
« Reply #14 on: May 13, 2014, 03:27:14 PM »
Ok, managed to do it with 'xmodmap'. Thanks for everyones help.