From: Scott L. <sl...@cs...> - 2002-04-24 17:09:58
|
> I'd use Emacs as a guide. Try hitting something like C-c C-2 and you'll > see it complain "C-c C-@" is undefined. Scwm could do that using a > popup message box for a user configurable amount of time. Neither of > the keystrokes get inserted into the buffer. (Just as Scwm wouldn't > send either to the application.) The upshot of that is that prefix keys > should be non-app keys, but that's good sense, anyway. > > Thanks, > Greg > I don't think the situation is entirely analogous since there is no question of emacs passing the event on to the app. In any case, I think that is the most reasonable behavior. There is an interesting side effect to this behavior. If we follow the emacs model of event maps are a single event deep and prefixes are handled by going down to another event map, then the event maps act differently. Consider, bindings like so: event_map M-F1 => event_map M => maximize window m => minimize window i => iconify window Now, if the user types "M-F1 j", a message displays saying this is not bound and nothing else happens. If the user type "j", then this gets sent on to the application. So in the first level event map, unbound events gets passed through. In the second level event map, unbound events cause a message to be displayed. The implementation in X calls is likely to be different too. The first level event map will need to install a bunch of passive X grabs to get its keys, but the second one will probably be handled with at least the keyboard grabbed. I suppose this distinction could be made when the event map gets installed and thus hidden from the user. It does create some interesting problems, though. - Scott |