- Welcome, Guest. Please Login or Register
MindFusion  
  We have released initial version of MindFusion.Scheduling library for HTML5 & JavaScript.  
  HomeHelpSearchLoginRegister   
     
     
   
 
Page Index Toggle Pages: 1 Send Topic Print  
Can I map Alt-F4 to a new, custom key?
Read 59 times

MFusion Swing KBoard   Offline
YaBB Newbies
*
Posts: 11
I Love MindFusion!


   
     
 
Can I map Alt-F4 to a new, custom key?
Apr 25th, 2019 at 6:39pm
 
Is it possible to create a new key that when clicked sent an Alt-F4 from the Virtual Keyboard?
 
 
 
IP Logged    
 
     

Slavcho   Offline
YaBB Moderator
*****
Posts: 1677
Gender: male
tech.support


   
     
 
Re: Can I map Alt-F4 to a new, custom key?
Reply #1 - Apr 25th, 2019 at 7:42pm
 
The ExtendedKey class supports that-
Code:
KeyboardLayout kl = KeyboardLayout.create("D:\\BrowserKeyboard.xml");

ExtendedKey ek = new ExtendedKey();
ArrayList<com.mindfusion.keyboard.Key> list = new ArrayList<>();
list.add(Key.ALT);
list.add(Key.F4);
ek.setKeys(list);
ek.setContent("Close");
kl.getKeys().add(ek);

vkb.setTemplateLayout(kl);
vkb.setMode(KeyboardMode.Custom); 



Unfortunately there's an issue with ExtendedKey XML loading code and can't load its instances from xml template file, only adding from code works at this time. We'll try to fix this next week.

Regards,
Slavcho
 
 
 
IP Logged    
 
     

MFusion Swing KBoard   Offline
YaBB Newbies
*
Posts: 11
I Love MindFusion!


   
     
 
Re: Can I map Alt-F4 to a new, custom key?
Reply #2 - Apr 25th, 2019 at 7:48pm
 
This is AWESOME!  Thanks!
 
 
 
IP Logged    
 
     

Slavcho   Offline
YaBB Moderator
*****
Posts: 1677
Gender: male
tech.support


   
     
 
Re: Can I map Alt-F4 to a new, custom key?
Reply #3 - May 16th, 2019 at 1:36pm
 
This build should now successfully load ExtendedKey objects from layout files -
https://mindfusion.eu/_temp/jvk_extended.zip

Regards,
Slavcho
 
 
 
IP Logged    
 
     
Page Index Toggle Pages: 1 Send Topic Print