I have been messing around with this for a while. I have noticed that in Tk::Text nthe author did not include a save function at all let alone a <Control-s> binding. So I am creating this binding myself in my program and I can get the save_vile sub to be called when I enter CTRL+s but it also enters a control character in the text field of my profram.
This will not do of course so I have looked into ways to get this character to not print to screen when entered. In Tk::Text they have a bindRdOnly sub that looks like it would do what I want it to do but every time I try and use it it cries about not having a package or an object fed to it. So naturally I try to give it one of my widget fields and this makes it happy (at least enough to run ) but then the control signal still appears and the file wont even save.
$t->bindRdOnly('<Control-s>', [\&save_file]);
That is my code I have tried. I have tried about 10 variations of this code and even have tried to re-create the recursive function of "sub ClassInit" in Tk::Text because this appears to be how the author of this mod used the bindRdOnly function. Of course that diod not work either.
Anyone have any ideas on how I can accomplish this?