<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        mso-fareast-language:EN-US;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=NL-BE link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US>Hi<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Is it possible to capture an event when the user presses F5 or uses the refresh menu item in the DITA menu?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>I have following code, but this only gets triggered when the user presses the F5 key. Not when the menu item is clicked.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>KeyboardFocusManager.getCurrentKeyboardFocusManager()<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                .addKeyEventDispatcher(new KeyEventDispatcher() {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>            @Override<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>            public boolean dispatchKeyEvent(KeyEvent e) {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                if (e.getKeyCode() == KeyEvent.VK_F5) {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                    try {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                        WorkItem workItem = AuthoringBridge.getWorkArea().getWorkItemByPath(getEditorLocation());<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                        // Enable/disable the editor area<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                        EditorHelper.setEditable(getEditorLocation(), workItem.getIsEditable());<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                    } catch (MalformedURLException ex) {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                        Logging.writeError(this.getClass().getName() + ".addListeners", ex.toString());<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                    }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                return false;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>            }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>        });<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Thanks in advance<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:NL-BE'>Jan Bevers <span style='color:red'>|</span></span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:NL-BE'> Developer <b><span style='color:red'>|</span></b><span style='color:red'> </span>SDL <b><span style='color:red'>|</span> </b>Content Management Technologies Division <b><span style='color:red'>| </span></b>+32 (0)15 400 970<span style='color:red'> <b>|</b></span> jbevers@sdl.com <br></span><span style='mso-fareast-language:NL-BE'><img width=275 height=77 id="Picture_x0020_1" src="cid:image001.jpg@01CE2A10.621D1700" alt="Description: image001"></span><o:p></o:p></p></div><pre></pre><font face="arial" size="2" color="#736F6E">



<a href="http://www.sdl.com/?utm_source=Email&utm_medium=Email%2BSignature&utm_campaign=SDL%2BStandard%2BEmail%2BSignature">
<img src="http://www.sdl.com/email.png" border=0><br><br>www.sdl.com
</a><br><br>

<font face="arial" size="1" color="#736F6E">

<b>SDL PLC confidential, all rights reserved.</b>

If you are not the intended recipient of this mail SDL requests and requires that you delete it without acting upon or copying any of its contents, 
and we further request that you advise us.<BR>
SDL PLC is a public limited company registered in England and Wales.  
Registered number: 02675207.<BR>
Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, UK.
</font>
</pre></body></html>