Clicking HyperLinks in a RichTextBox without holding down CTRL – WPF

I found a solution. Set IsDocumentEnabled to “True” and set IsReadOnly to “True”. <RichTextBox IsReadOnly=”True” IsDocumentEnabled=”True” /> Once I did this, the mouse would turn into a ‘hand’ when I hover over a text displayed within a HyperLink tag. Clicking without holding control will fire the ‘Click’ event. I am using WPF from .NET 4. … Read more

Capturing ctrl+z key combination in javascript

Use onkeydown (or onkeyup), not onkeypress Use keyCode 90, not 122 function KeyPress(e) { var evtobj = window.event? event : e if (evtobj.keyCode == 90 && evtobj.ctrlKey) alert(“Ctrl+z”); } document.onkeydown = KeyPress; Online demo: http://jsfiddle.net/29sVC/ To clarify, keycodes are not the same as character codes. Character codes are for text (they differ depending on the … Read more