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