Re: Strange problem when using the "F" keys in key shortcuts, what is wrong?

"M. M." <[email protected]> Sat, 7 May 2022 12:15:11 +0100
Newsgroups gmane.comp.window-managers.fluxbox.user
Message-ID <CANm-CJFPcLOEe5XEhdp8kz-iim82HxiSxtzJ+=BpkVpZtNfVpw@mail.gmail.com>
--===============8479604377700446830==
Content-Type: multipart/alternative; boundary="00000000000053d79005de6a1727"

--00000000000053d79005de6a1727
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hello Matt and thanks for the tips!

Of course adding None before the F key did not change anything but it was
nice to at least give it a go. Do not want to dig so deep into it to play
with keymode stuff as it does not bother me much. Of course I was curious
how to bypass it but to be honest I was also curious if that's normal
behaviour - not as I know that it is absolutely normal I am cool with it.

niedz., 1 maj 2022 o 17:07 Matt Banack <[email protected]> napisa=C5=82(a):

> Hi MM,
>
> Try prefacing each line with "None".
>
> None F1 Escape :RootMenu
>
> But you will still probably have problems using F1-F4 for their normal
> function, as after pressing ie F4, Fluxbox is waiting to see if you
> complete any of the defined chains.  If you press some other key that
> doesn't complete a chain, I believe it would then press the original F-ke=
y
> and then the new key.  Also note the line from the fluxbox-keys manpage:
> "To abort a chained command part-way through typing it, press the <ESC>
> key."
>
> You should also look into KeyMode, you can do something like this:
> None F1 :KeyMode fone
> fone: None h :Exec whatever
> fone: None a :Exec somethingelse
> # actually send an F1 key ... note that I didn't actually test this... I'=
m
> pretty sure if you're in keymode "fone", just pressing F1 again would sen=
d
> the key through as normal
> fone: None space :Exec xdotool key F1
> # return to normal mode
> fone: None Esc :KeyMode default
>
> Then pressing F1 puts you into a special mode where the other bindings ar=
e
> active, so F1, a, h, a, ESC would enter the mode, exec 3 things, and then
> return to normal mode.  You could also use MacroCmd to Exec something and
> then automatically do KeyMode default.
>
> I'm not aware of any built-in way to send keystrokes that specifically
> bypass the shortcut system.  If anyone else knows I'd be interested,
> otherwise maybe that's something to consider as a new command?  That woul=
d
> make it a lot easier to reason about something like this, ie use "None F1=
"
> as a leader key for shortcuts, but if you actually want to type F1 then
> bind "Mod4 F1" to send a raw F1.
>
> Matt
>
> On Sat, Apr 23, 2022 at 3:47 PM M. M. <[email protected]> wrote:
>
>> Hello, I have rather unusual problem with keybindings in Fluxbox that
>> started since I decided to use more F keys on my desktop. It is related =
as
>> after removing these bindings things go back to normal - yet, I think it
>> shouldn't happen.
>>
>> Using stable 1.3.7 Fluxbox version and keyboard layout is set to "pl, pl=
".
>>
>> Here are my F keys related bindings:
>>
>> F1 Escape :RootMenu
>> F1 Return :Exec urxvt
>> F1 H :Exec xmessage -fn -*-fixed-*-*-*-*-18-*-*-*-*-*-*-* -bg gray15 -fg
>> gray -center -file ~/.fluxbox/keys
>>
>> F2 Left :PrevWorkspace
>> F2 Right :NextWorkspace
>> F2 Escape Left :SendToWorkspace 1
>> F2 Escape Right :SendToWorkspace 2
>> F2 Shift Left :TakeToPrevWorkspace
>> F2 Shift Right :TakeToNextWorkspace
>>
>> F3 C :Close
>> F3 M :Maximize
>> F3 N :Minimize
>> F3 F11 :Fullscreen
>> F3 Up             :MacroCmd {SetDecor NORMAL} {ShadeOn}
>> F3 Down           :MacroCmd {ShadeOff} {SetDecor BORDER}
>>
>> F4 Right :MacroCmd {ResizeTo 50% 100%} {MoveTo 00 00 Right}
>> F4 Left :MacroCmd {ResizeTo 50% 100%} {MoveTo 00 00 Left}
>> F4 Up :MacroCmd {ResizeTo 100% 50%} {MoveTo 00 00 Top}
>> F4 Down :MacroCmd {ResizeTo 100% 50%} {MoveTo 00 00 Bottom}
>>
>> F4 Prior :MacroCmd {ResizeTo 50% 50%} {MoveTo 00 00 TopRight}
>> F4 Insert :MacroCmd {ResizeTo 50% 50%} {MoveTo 00 00 TopLeft}
>> F4 Next :MacroCmd {ResizeTo 50% 50%} {MoveTo 00 00 BottomRight}
>> F4 Delete :MacroCmd {ResizeTo 50% 50%} {MoveTo 00 00 BottomLeft}
>>
>> Now, what is wrong: when I press F1-F4 keys on my desktop with no window=
s
>> open and after that I try to for example use right mouse button to open =
the
>> root menu it does not open - there is no reaction. When I press the F1-F=
4
>> key again(does not matter, I can press F1 to make it happen and later F3=
 to
>> fix it) - all works. It seems like because of these keys are being in ke=
y
>> bindings they got some kind of "function"? Cannot explain it better, the=
y
>> just put desktop in some kind of "state" when pressed and release that
>> "state" when pressed again. Like some kind of layer is being put on top =
of
>> the desktop, I dunno how to properly explain it.
>>
>> I was totally surprised when I found out that these keys being used in
>> keys file are the reason for my desktop strange behaviour and I am very
>> curious where is the problem. Hope someone will be able to help me
>> understand what is actually going on.
>> _______________________________________________
>> Fluxbox-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/fluxbox-users
>>
>

--00000000000053d79005de6a1727
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hello Matt and thanks for the tips!</div><div><br></d=
iv><div>Of course adding None before the F key did not change anything but =
it was nice to at least give it a go. Do not want to dig so deep into it to=
 play with keymode stuff as it does not bother me much. Of course I was cur=
ious how to bypass it but to be honest I was also curious if that&#39;s nor=
mal behaviour - not as I know that it is absolutely normal I am cool with i=
t.<br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"=
gmail_attr">niedz., 1 maj 2022 o 17:07=C2=A0Matt Banack &lt;<a href=3D"mail=
to:[email protected]">[email protected]</a>&gt; napisa=C5=82(a):<br></div><=
blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l=
eft:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr">Hi MM,<di=
v><br></div><div>Try prefacing each line with &quot;None&quot;.</div><div><=
br></div><div>None F1 Escape :RootMenu</div><div><br></div><div>But you wil=
l still probably have problems using F1-F4 for their normal function, as af=
ter pressing ie F4, Fluxbox is waiting to see if you complete any of the de=
fined chains.=C2=A0 If you press some other key that doesn&#39;t complete a=
 chain, I believe it would then press the original F-key and then the new k=
ey.=C2=A0 Also note the line from the fluxbox-keys manpage: &quot;To abort =
a chained command part-way through typing it, press the &lt;ESC&gt; key.&qu=
ot;</div><div><br></div><div>You should also look into KeyMode, you can do =
something=C2=A0like this:</div><div>None F1 :KeyMode fone</div><div>fone: N=
one h :Exec whatever</div><div>fone: None a :Exec somethingelse</div><div>#=
 actually send an F1 key ... note that I didn&#39;t actually test this... I=
&#39;m pretty sure if you&#39;re in keymode &quot;fone&quot;, just pressing=
 F1 again would send the key through as normal</div><div>fone: None space :=
Exec xdotool key F1<br></div><div># return to normal mode</div><div>fone: N=
one Esc :KeyMode default</div><div><br></div><div>Then pressing F1 puts you=
 into a special mode where the other bindings are active, so F1, a, h, a, E=
SC would enter the mode, exec 3 things, and then return to normal mode.=C2=
=A0 You could also use MacroCmd to Exec something and then automatically do=
 KeyMode default.</div><div><br></div><div>I&#39;m not aware of any built-i=
n way to send keystrokes that specifically bypass the shortcut system.=C2=
=A0 If anyone else knows I&#39;d be interested, otherwise maybe that&#39;s =
something to consider as a new command?=C2=A0 That would make it a lot easi=
er to reason about something like this, ie use &quot;None F1&quot; as a lea=
der key for shortcuts, but if you actually want to=C2=A0type F1 then bind &=
quot;Mod4 F1&quot; to send a raw F1.</div><div><br></div><div>Matt</div></d=
iv><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On =
Sat, Apr 23, 2022 at 3:47 PM M. M. &lt;<a href=3D"mailto:[email protected]=
" target=3D"_blank">[email protected]</a>&gt; wrote:<br></div><blockquote =
class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px sol=
id rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr">Hello, I have rather=
 unusual problem with keybindings in Fluxbox that started since I decided t=
o use more F keys on my desktop. It is related as after removing these bind=
ings things go back to normal - yet, I think it shouldn&#39;t happen.<br><b=
r>Using stable 1.3.7 Fluxbox version and keyboard layout is set to &quot;pl=
, pl&quot;.<br><br>Here are my F keys related bindings:<br><br>F1 Escape :R=
ootMenu<br>F1 Return			:Exec urxvt<br>F1 H				:Exec xmessage -fn -*-fixed-*=
-*-*-*-18-*-*-*-*-*-*-* -bg gray15 -fg gray -center -file ~/.fluxbox/keys<b=
r><br>F2 Left				:PrevWorkspace<br>F2 Right			:NextWorkspace<br>F2 Escape L=
eft		:SendToWorkspace 1<br>F2 Escape Right		:SendToWorkspace 2<br>F2 Shift =
Left		:TakeToPrevWorkspace<br>F2 Shift Right		:TakeToNextWorkspace<br><br>F=
3 C				:Close<br>F3 M				:Maximize<br>F3 N				:Minimize<br>F3 F11				:Fulls=
creen<br>F3 Up =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0	:MacroCmd {SetDeco=
r NORMAL} {ShadeOn}<br>F3 Down =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0	:MacroCmd=
 {ShadeOff} {SetDecor BORDER}<br><br>F4 Right			:MacroCmd {ResizeTo 50% 100=
%} {MoveTo 00 00 Right}<br>F4 Left				:MacroCmd {ResizeTo 50% 100%} {MoveTo=
 00 00 Left}<br>F4 Up				:MacroCmd {ResizeTo 100% 50%} {MoveTo 00 00 Top}<b=
r>F4 Down				:MacroCmd {ResizeTo 100% 50%} {MoveTo 00 00 Bottom}<br><br>F4 =
Prior			:MacroCmd {ResizeTo 50% 50%} {MoveTo 00 00 TopRight}<br>F4 Insert		=
	:MacroCmd {ResizeTo 50% 50%} {MoveTo 00 00 TopLeft}<br>F4 Next				:MacroCm=
d {ResizeTo 50% 50%} {MoveTo 00 00 BottomRight}<br>F4 Delete			:MacroCmd {R=
esizeTo 50% 50%} {MoveTo 00 00 BottomLeft}<br><br>Now, what is wrong: when =
I press F1-F4 keys on my desktop with no windows open and after that I try =
to for example use right mouse button to open the root menu it does not ope=
n - there is no reaction. When I press the F1-F4 key again(does not matter,=
 I can press F1 to make it happen and later F3 to fix it) - all works. It s=
eems like because of these keys are being in key bindings they got some kin=
d of &quot;function&quot;? Cannot explain it better, they just put desktop =
in some kind of &quot;state&quot; when pressed and release that &quot;state=
&quot; when pressed again. Like some kind of layer is being put on top of t=
he desktop, I dunno how to properly explain it.<br><br>I was totally surpri=
sed when I found out that these keys being used in keys file are the reason=
 for my desktop strange behaviour and I am very curious where is the proble=
m. Hope someone will be able to help me understand what is actually going o=
n.</div>
_______________________________________________<br>
Fluxbox-users mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">Fl=
[email protected]</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/fluxbox-users" rel=
=3D"noreferrer" target=3D"_blank">https://lists.sourceforge.net/lists/listi=
nfo/fluxbox-users</a><br>
</blockquote></div>
</blockquote></div>

--00000000000053d79005de6a1727--


--===============8479604377700446830==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============8479604377700446830==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Fluxbox-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fluxbox-users

--===============8479604377700446830==--