Thank you very much for responding to my question. After seeing your reply I quickly checked at the docs for 'global'.
As per perldoc for Tk::Entry it's about the grab thing (i.e. grabbbing the input -- mouse and keyboard). Also from the book 'Mastering Perl/Tk by Oreily Press Chapter 13
- a global grab means no applications in the entire system can get input except the one window that has done the global grab. But Windox XP does allow me to select through mouse as well type into other applications in the system. I do not know if that's how global grab is implemented in this OS.
Anyway, back to the original question, your fix works correctly when the workaround code is removed. Therefore out of curiosity and for learning purposes my question is
- In the first place, how's is the fix for this problem related to grab thing?
- When the workaround code is in place this fix does not work. Therefore, is the grab and virtual event somehow opposed to each other ?
- Also as an aside, I created a binding for the paste (i.e. Control-v) as there is no default binding for it,
$entry->bind('<Control-Key-v>'=>sub{
$_[0]->delete ('sel.first', 'sel.last');
$_[0]->insert ('insert', .....);
});
but how can I get the string to be pasted passed into the callback(hence left out as five dots above) ? But when I comment out the line calling insert method, the paste works as expected. That said, as per the perldoc for Tk::Entry there is no default binding for Control-v. So how does this work then. I'm confused.
I'm really curious. So please let me know. | [reply] [d/l] |