Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: mbertrand on May 12, 2014, 01:34:22 PM

Title: flwm shortcut keys
Post by: mbertrand 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?
Title: Re: flwm shortcut keys
Post by: Rich 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.
Title: Re: flwm shortcut keys
Post by: mbertrand 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?
Title: Re: flwm shortcut keys
Post by: Rich 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.
Title: Re: flwm shortcut keys
Post by: mbertrand 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?
Title: Re: flwm shortcut keys
Post by: Rich 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.
Title: Re: flwm shortcut keys
Post by: curaga on May 12, 2014, 03:03:20 PM
You need to use another WM.
Title: Re: flwm shortcut keys
Post by: mbertrand 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?
Title: Re: flwm shortcut keys
Post by: curaga 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).
Title: Re: flwm shortcut keys
Post by: mbertrand 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?
Title: Re: flwm shortcut keys
Post by: curaga on May 13, 2014, 12:02:09 PM
Certainly there is, see xmodmap.
Title: Re: flwm shortcut keys
Post by: mbertrand 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?
Title: Re: flwm shortcut keys
Post by: Rich on May 13, 2014, 01:06:57 PM
Hi mbertrand
Googling for:
linux swap alt and ctrl keys
gives a lot of hits.
Title: Re: flwm shortcut keys
Post by: mbertrand 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.
Title: Re: flwm shortcut keys
Post by: mbertrand on May 13, 2014, 03:27:14 PM
Ok, managed to do it with 'xmodmap'. Thanks for everyones help.