<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Checking for modifier keys (ctrl, alt, shift) in script without mouse trapping in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Checking-for-modifier-keys-ctrl-alt-shift-in-script-without/m-p/748443#M92884</link>
    <description>&lt;P&gt;Feedback from Jmp developer [TS-00139632]:&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;This function does not return the current state of the control key but rather the state of the control key at the start of another event like mouse click or key press.&amp;nbsp; JMP does have an internal function to get the modified key state at any time but this is not exposed via JSL.&amp;nbsp; If you would like this added, I would suggest that you add it to the JMP Wish List.&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;-&amp;gt; here is the wish:&lt;BR /&gt;&lt;LI-MESSAGE title="JSL function to get the current status of modifier keys" uid="748442" url="https://community.jmp.com/t5/JMP-Wish-List/JSL-function-to-get-the-current-status-of-modifier-keys/m-p/748442#U748442" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-idea-thread lia-fa-icon lia-fa-idea lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 22 Apr 2024 14:12:33 GMT</pubDate>
    <dc:creator>hogi</dc:creator>
    <dc:date>2024-04-22T14:12:33Z</dc:date>
    <item>
      <title>Checking for modifier keys (ctrl, alt, shift) in script without mouse trapping</title>
      <link>https://community.jmp.com/t5/Discussions/Checking-for-modifier-keys-ctrl-alt-shift-in-script-without/m-p/391510#M64186</link>
      <description>&lt;P&gt;Is there a way to check if a modifier key such as ctrl, alt or shift is depressed during execution of a jsl script? I know the "is ... key()" functions, but they only work with the mouse. I would like to let a script do various things on execution depending on which modifier key is depressed while it is executed.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 19:48:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Checking-for-modifier-keys-ctrl-alt-shift-in-script-without/m-p/391510#M64186</guid>
      <dc:creator>ThomasZatValcon</dc:creator>
      <dc:date>2023-06-09T19:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for modifier keys (ctrl, alt, shift) in script without mouse trapping</title>
      <link>https://community.jmp.com/t5/Discussions/Checking-for-modifier-keys-ctrl-alt-shift-in-script-without/m-p/391596#M64196</link>
      <description>&lt;P&gt;You can use functions like `is control key()`, like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;New Window("Modifier Key Check",
	vlb = V List Box(
		Mouse Box(
			Graph Box(),
			&amp;lt;&amp;lt;setClickEnable( 1 ),
			&amp;lt;&amp;lt; Set Click( 
				Function( {this, clickpt, event}, 
					
					if( event == "Pressed",
						if( is alt key(),
							txt = "pressed with alt",
							is control key(),
							txt = "pressed with control",
							is shift key(),
							txt = "pressed with shift",
							txt = "pressed"
						);
						
						New Window("Button Pressed", &amp;lt;&amp;lt; Modal, text box( txt ) );
					)
				)
			)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Jun 2021 11:55:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Checking-for-modifier-keys-ctrl-alt-shift-in-script-without/m-p/391596#M64196</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2021-06-08T11:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for modifier keys (ctrl, alt, shift) in script without mouse trapping</title>
      <link>https://community.jmp.com/t5/Discussions/Checking-for-modifier-keys-ctrl-alt-shift-in-script-without/m-p/391688#M64207</link>
      <description>&lt;P&gt;Sorry I just read your post again and I guess you wanted to do this when not using the mouse.&amp;nbsp; Can you give a description of when a user would press a modifier key that isn't related to a mouse click?&amp;nbsp; I am having a hard time picturing your use case.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 15:54:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Checking-for-modifier-keys-ctrl-alt-shift-in-script-without/m-p/391688#M64207</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2021-06-08T15:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for modifier keys (ctrl, alt, shift) in script without mouse trapping</title>
      <link>https://community.jmp.com/t5/Discussions/Checking-for-modifier-keys-ctrl-alt-shift-in-script-without/m-p/391734#M64210</link>
      <description>&lt;P&gt;You can search the Scripting Index for functions. There is a group of Utility functions that includes inquiries about modifier keys that are current pressed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="is alt.PNG" style="width: 804px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33384iD9A6E5808DAC22DE/image-size/large?v=v2&amp;amp;px=999" role="button" title="is alt.PNG" alt="is alt.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 16:51:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Checking-for-modifier-keys-ctrl-alt-shift-in-script-without/m-p/391734#M64210</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2021-06-08T16:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for modifier keys (ctrl, alt, shift) in script without mouse trapping</title>
      <link>https://community.jmp.com/t5/Discussions/Checking-for-modifier-keys-ctrl-alt-shift-in-script-without/m-p/745000#M92479</link>
      <description>&lt;P&gt;Hm, when I use the &lt;STRONG&gt;Enter&lt;/STRONG&gt; button on the numeric keypad or the &lt;STRONG&gt;play&lt;/STRONG&gt; button in the Scripting Index, I get:&lt;BR /&gt;- 0, if CTRL is NO being pressed&lt;/P&gt;&lt;P&gt;- 2 if CTRL is being pressed&lt;/P&gt;&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6350429316112w578h170r753" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6350429316112" data-account="6058004218001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6058004218001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6350429316112w578h170r753');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://community.jmp.com/t5/video/gallerypage/video-id/6350429316112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I try the same via the &lt;STRONG&gt;play button in the toolbar&lt;/STRONG&gt;, the result is always 0&amp;nbsp;&lt;BR /&gt;(believe me that I pressed CTRL or try it on your own :).&lt;BR /&gt;Is this the expected behavior?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6350430374112w880h400r238" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6350430374112" data-account="6058004218001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6058004218001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6350430374112w880h400r238');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://community.jmp.com/t5/video/gallerypage/video-id/6350430374112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The idea was to trigger 2 different actions depending on the CTRL status.&lt;BR /&gt;Is there another way to get the info about the CTRL status - maybe especially for a script that is triggered by clicking on an icon in a toolbar?&lt;/P&gt;</description>
      <pubDate>Sat, 06 Apr 2024 21:38:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Checking-for-modifier-keys-ctrl-alt-shift-in-script-without/m-p/745000#M92479</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-04-06T21:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for modifier keys (ctrl, alt, shift) in script without mouse trapping</title>
      <link>https://community.jmp.com/t5/Discussions/Checking-for-modifier-keys-ctrl-alt-shift-in-script-without/m-p/748443#M92884</link>
      <description>&lt;P&gt;Feedback from Jmp developer [TS-00139632]:&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;This function does not return the current state of the control key but rather the state of the control key at the start of another event like mouse click or key press.&amp;nbsp; JMP does have an internal function to get the modified key state at any time but this is not exposed via JSL.&amp;nbsp; If you would like this added, I would suggest that you add it to the JMP Wish List.&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;-&amp;gt; here is the wish:&lt;BR /&gt;&lt;LI-MESSAGE title="JSL function to get the current status of modifier keys" uid="748442" url="https://community.jmp.com/t5/JMP-Wish-List/JSL-function-to-get-the-current-status-of-modifier-keys/m-p/748442#U748442" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-idea-thread lia-fa-icon lia-fa-idea lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2024 14:12:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Checking-for-modifier-keys-ctrl-alt-shift-in-script-without/m-p/748443#M92884</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-04-22T14:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for modifier keys (ctrl, alt, shift) in script without mouse trapping</title>
      <link>https://community.jmp.com/t5/Discussions/Checking-for-modifier-keys-ctrl-alt-shift-in-script-without/m-p/788117#M96954</link>
      <description>&lt;P&gt;&lt;STRONG&gt;My application cases:&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;STRONG&gt;send to PPT&lt;/STRONG&gt;&lt;BR /&gt;- default: send a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;screenshot&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to powerpoint&lt;BR /&gt;- with CTRL pressed, send a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;vector graphics&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;to powerpoint&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;&lt;STRONG&gt;subsets&lt;/STRONG&gt;&lt;BR /&gt;- default: create a linked subset&lt;BR /&gt;- with CTRL : create a subset which is not linked&lt;BR /&gt;- with Shift : just include columns which are selected at the moment.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How will you use this new functionality?&lt;BR /&gt;&lt;BR /&gt;The wish got "acknowledged" - now it's up to the users to show interest ...&amp;nbsp;&lt;BR /&gt;Please follow the link and support the wish with a Kudo :&amp;nbsp;&lt;BR /&gt;&lt;LI-MESSAGE title="JSL function to get the current status of modifier keys" uid="748442" url="https://community.jmp.com/t5/JMP-Wish-List/JSL-function-to-get-the-current-status-of-modifier-keys/m-p/748442#U748442" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-idea-thread lia-fa-icon lia-fa-idea lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2024 12:47:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Checking-for-modifier-keys-ctrl-alt-shift-in-script-without/m-p/788117#M96954</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-08-28T12:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for modifier keys (ctrl, alt, shift) in script without mouse trapping</title>
      <link>https://community.jmp.com/t5/Discussions/Checking-for-modifier-keys-ctrl-alt-shift-in-script-without/m-p/826572#M100761</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-jsl"&gt;is control Key ()&lt;/CODE&gt;could be so useful!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another application case:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;for(t=5, t&amp;gt;-1, t--,
Caption("go to the plot\!n"|| Char(t));
if(is control Key (), break());
 wait(1);
);
Caption(remove);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I want to give the user the chance to stop the for loop manually - via a key on the keyboard.&lt;BR /&gt;Interesting that one needs a mouse click to allow JMP to process the current state of a key.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2025 07:24:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Checking-for-modifier-keys-ctrl-alt-shift-in-script-without/m-p/826572#M100761</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2025-01-10T07:24:52Z</dc:date>
    </item>
  </channel>
</rss>

