_on_[nonedit_]unassigned_key_ bug(s)

13 views
Skip to first unread message

Carlo Hogeveen

unread,
Jun 29, 2024, 8:24:58 AM (7 days ago) Jun 29
to Semware @ GoogleGroups

TSE's macro language has the hooks _ON_UNASSIGNED_KEY_ and _ON_NONEDIT_UNASSIGNED_KEY_, but I cannot make these events happen.

When I type keys which I have checked to have no definitions, for example <CtrlShift 3>, neither of these hooks gets called.

The CUAmark macro defines the use of one of these hooks, but I gained no insight from this.

I was able to narrow the bug(s) down in two ways.
TSE versions up to and including 4.41.28 work partially right:
_ON_NONEDIT_UNASSIGNED_KEY gets called for undefined keys, unfortunately in edit mode too.
In TSE versions from 4.41.29 the full bug exists.

Below this message is a simple test macro which literally lets you "test by ear".
First it blocks and should make a sound for all keys except <Escape>.
After pressing <Escape> only generally undefined keys are sounded out.
Note two things:
1. The sound only happens in TSE v4.41.28 and older.
2. Even then only _on_nonedit_unassigned_key_ with the low sound is sounded out, never the high sound of _on_unassigned_key_.
Side note: When testing it made no difference whether CUAmark was loaded.

TSE's read.me file gives a significant hint of what was changed in TSE v4.41.29.

For background context, this is not a totally frivolous report.
For the LinuxMouse extension it now matters whether <WheelDown> and <WheelUp> are explicitly defined.
I was trying to find an answer by way of these hooks.

Carlo



proc on_unassigned_key()
sound(1200,500)
end on_unassigned_key

proc on_nonedit_unassigned_key()
sound(200, 500)
end on_nonedit_unassigned_key

keydef exclusive_keys
<escape> disable(exclusive_keys)
end exclusive_keys

proc Main()
Hook(_ON_NONEDIT_UNASSIGNED_KEY_, on_unassigned_key)
Hook(_ON_UNASSIGNED_KEY_ , on_nonedit_unassigned_key)
enable(exclusive_keys, _exclusive_)
end Main




S.E. Mitchell

unread,
Jun 29, 2024, 10:38:00 AM (6 days ago) Jun 29
to sem...@googlegroups.com
This has been fixed.
I'll upload a new version soon.
Thanks for the report!
--
Sammy
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/semware/000901daca1f%2458bfc250%240a3f46f0%24%40ecarlo.nl.
Reply all
Reply to author
Forward
0 new messages