{"id":55891,"date":"2022-05-21T03:01:17","date_gmt":"2022-05-20T17:01:17","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=55891"},"modified":"2022-05-21T12:09:28","modified_gmt":"2022-05-21T02:09:28","slug":"keyboard-based-cursor-share-content-copy-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/keyboard-based-cursor-share-content-copy-tutorial\/","title":{"rendered":"Keyboard Based Cursor Share Content Copy Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/body_mouse_deepdive.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Keyboard Based Cursor Share Content Copy Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/body_mouse_deepdive_share.jpg\" title=\"Keyboard Based Cursor Share Content Copy Tutorial\"  style=\"float:left;\"   \/><\/a><p class=\"wp-caption-text\">Keyboard Based Cursor Share Content Copy Tutorial<\/p><\/div>\n<p>Yesterday&#8217;s <a title='Keyboard Based Cursor Personalized Content Copy Tutorial' href='#kbcpcct'>Keyboard Based Cursor Personalized Content Copy Tutorial<\/a> has probably reached a point where some sharing mechanism is apt, for accountability and usefulness purposes, at the very least, regarding our recent web application allowing for foreground content on top of a random <a target=_blank title='Lorem Picsum' href='https:\/\/picsum.photos\/'>Lorem Picsum<\/a> background image.<\/p>\n<p>We&#8217;ve been helped out greatly by <a target=_blank title='javascript - Can I take a screenshot from the clipboard? - Stack Overflow' href='https:\/\/stackoverflow.com\/questions\/55559432\/can-i-take-a-screenshot-from-the-clipboard'>javascript &#8211; Can I take a screenshot from the clipboard? &#8211; Stack Overflow<\/a> and <a target=_blank title='html - How to render a blob on a canvas element? - Stack Overflow' href='https:\/\/stackoverflow.com\/questions\/38004917\/how-to-render-a-blob-on-a-canvas-element'>html &#8211; How to render a blob on a canvas element? &#8211; Stack Overflow<\/a> in the following new relevant Javascript code &#8230;<\/p>\n<p><code><br \/>\nfunction renderNoImage(canvas, blob) {  \/\/ thanks to https:\/\/stackoverflow.com\/questions\/38004917\/how-to-render-a-blob-on-a-canvas-element<br \/>\n  const ctx = canvas.getContext('2d');<br \/>\n  const img = new Image();<br \/>\n  img.onload = (event) =&gt; {<br \/>\n    URL.revokeObjectURL(event.target.src) \/\/  This is important. If you are not using the blob, you should release it if you don't want to reuse it. It's good for memory.<br \/>\n    ctx.drawImage(event.target, 0, 0)<br \/>\n  img.style.display='none';<br \/>\n  img.style.zIndex='-123';<br \/>\n  };<br \/>\n  img.src = URL.createObjectURL(blob);<br \/>\n}<br \/>\n<br \/> <br \/>\nfunction renderImage(canvas, blob) {  \/\/ thanks to https:\/\/stackoverflow.com\/questions\/38004917\/how-to-render-a-blob-on-a-canvas-element<br \/>\n  const ctx = canvas.getContext('2d');<br \/>\n  const img = new Image();<br \/>\n  img.onload = (event) =&gt; {<br \/>\n    URL.revokeObjectURL(event.target.src) \/\/  This is important. If you are not using the blob, you should release it if you don't want to reuse it. It's good for memory.<br \/>\n    ctx.drawImage(event.target, 0, 0)<br \/>\n  };<br \/>\n  img.src = URL.createObjectURL(blob);<br \/>\n}<br \/>\n<br \/> <br \/>\n  addEventListener(\"paste\", ev =&gt; { \/\/ thanks to https:\/\/stackoverflow.com\/questions\/55559432\/can-i-take-a-screenshot-from-the-clipboard<br \/>\n    for(const item of ev.clipboardData.items) { \/\/\/ Clipboard may contain multiple elements of different type -- text, image, etc<br \/>\n        if(item.type.startsWith(\"image\/\")) { \/\/\/ We are only interested in clipboard data that is an image<br \/>\n            if (emailee == '') {<br \/>\n            emailee=prompt('Your clipboard has a useful image you could share the image with.  Optionally, please enter an email address or SMS number to share with.');<br \/>\n            if (emailee == null) { emailee=''; }<br \/>\n            }<br \/>\n            if (emailee.indexOf('@') != -1) {<br \/>\n            document.getElementById('mydiv').style.overflow='scroll';<br \/>\n            document.getElementById('mycanvas').innerHTML='&lt;br&gt;&lt;canvas style=\"position:absolute;z-index:98;top:0px;left:0px;\" id=thecanvas width=' + screen.width + ' height=' + screen.height + '&gt;&lt;\/canvas&gt;';<br \/>\n            elem=document.getElementById('thecanvas');<br \/>\n            context=elem.getContext('2d');<br \/>\n            renderImage(elem, item.getAsFile()); \/\/context.drawImage(item.getAsFile(), 0, 0);<br \/>\n            document.getElementById('aemail').href=document.getElementById('aemail').href.replace(':?', ':' + emailee + '?');<br \/>\n            document.getElementById('aemail').click();<br \/>\n            document.getElementById('mycanvas').innerHTML='';<br \/>\n            } else if (emailee != '' && emailee.replace(\/0\/g,'').replace(\/1\/g,'').replace(\/2\/g,'').replace(\/3\/g,'').replace(\/4\/g,'').replace(\/5\/g,'').replace(\/6\/g,'').replace(\/7\/g,'').replace(\/8\/g,'').replace(\/9\/g,'') == '') {<br \/>\n            document.getElementById('mydiv').style.overflow='scroll';<br \/>\n            document.getElementById('mycanvas').innerHTML='&lt;br&gt;&lt;canvas style=\"position:absolute;z-index:98;top:0px;left:0px;\" id=thecanvas width=' + screen.width + ' height=' + screen.height + '&gt;&lt;\/canvas&gt;';<br \/>\n            elem=document.getElementById('thecanvas');<br \/>\n            context=elem.getContext('2d');<br \/>\n            renderImage(elem, item.getAsFile()); \/\/context.drawImage(item.getAsFile(), 0, 0);<br \/>\n            document.getElementById('asms').href=document.getElementById('asms').href.replace(':&', ':' + emailee + '&');<br \/>\n            document.getElementById('asms').click();<br \/>\n            document.getElementById('mycanvas').innerHTML='';<br \/>\n            } else {<br \/>\n            \/\/document.getElementById('mydiv').style.overflow='scroll';<br \/>\n            document.getElementById('mycanvas').innerHTML='&lt;br&gt;&lt;canvas style=\"display:none;position:absolute;z-index:-98;top:0px;left:0px;\" id=thecanvas width=' + screen.width + ' height=' + screen.height + '&gt;&lt;\/canvas&gt;';<br \/>\n            elem=document.getElementById('thecanvas');<br \/>\n            context=elem.getContext('2d');<br \/>\n            renderNoImage(elem, item.getAsFile()); \/\/context.drawImage(item.getAsFile(), 0, 0);<br \/>\n            document.getElementById('mycanvas').innerHTML='';<br \/>\n            }<br \/>\n        }<br \/>\n    }<br \/>\n});<br \/>\n<\/code> <\/p>\n<p> &#8230; which is explained to the user in the following way &#8230;<\/p>\n<blockquote><p>\nShare with email or SMS happens via screenshots (macOS control-command-shift-3 or Windows Prnt-Scrn) followed by File menu Paste option causing chance to share after which File menu Undo can remove pasted part as required.\n<\/p><\/blockquote>\n<p> &#8230; in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/body_mouse_deepdive.html---GETME\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/body_mouse_deepdive.html---GETME\">&#8220;proof of concept&#8221; body_mouse_deepdive.html<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/body_mouse_deepdive.html\" title=\"Click picture\">live run<\/a>.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/keyboard-based-cursor-share-content-copy-tutorial\/'>Keyboard Based Cursor Share Content Copy Tutorial<\/a>.<\/p-->\n<hr>\n<p id='kbcpcct'>Previous relevant <a target=_blank title='Keyboard Based Cursor Personalized Content Copy Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/keyboard-based-cursor-personalized-content-copy-tutorial\/'>Keyboard Based Cursor Personalized Content Copy Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/body_mouse_deepdive.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Keyboard Based Cursor Personalized Content Copy Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/body_mouse_deepdiveemoji.jpg\" title=\"Keyboard Based Cursor Personalized Content Copy Tutorial\"  style=\"float:left;\"   \/><\/a><p class=\"wp-caption-text\">Keyboard Based Cursor Personalized Content Copy Tutorial<\/p><\/div>\n<p>On top of yesterday&#8217;s <a title='Keyboard Based Cursor Content Copy Tutorial' href='#kbccct'>Keyboard Based Cursor Content Copy Tutorial<\/a> we wanted to offer the user the chance for them to tailor their foreground content on top of the <a target=_blank title='Lorem Picsum' href='https:\/\/picsum.photos\/'>Lorem Picsum<\/a> background image.<\/p>\n<p>The user can enter this via the keyboard because there is an HTML div <a target=_blank title='Global contenteditable attribute information from W3schools' href='https:\/\/www.w3schools.com\/tags\/att_global_contenteditable.asp'>contenteditable<\/a>=true pallette to work with &#8230;<\/p>\n<p><code><br \/>\n&lt;div id=mydiv onfocus='setTimeout(alte, 1000);' ondblclick=\"this.innerHTML='';\" onclick='stamp(event);' title='Click and type and see the cursor change as you use Alt or Shift or Control that can be reset via Caps Lock with a click copying cursor into content ... RJM Programming ... May, 2022 ... thanks to https:\/\/picsum.photos\/ Lorem Picsum  <font color=blue>You can change emojis if you know the \\002602 form of UTF-16 (hex) entry (our example is umbrella and if you express it as \\\\002602 that leaves cursor just as your emoji).  <\/font><font color=purple>Double click existant foreground emoji element to clear all the foreground emoji elements.<\/font>' spellcheck='false' contenteditable=true style='width:100vw;height:100%;color:transparent;text-color:transparent;' <font color=olive>onkeypress=kpcursorlook(event); <\/font>onkeydown=cursorlook(event); onmousemove=xycursorlook(event); ontouchmove=xycursorlook(event);&gt;&lt;\/div&gt;<br \/>\n<\/code><\/p>\n<p>It&#8217;s &#8220;title&#8221; attribute now talks about two new pieces of functionality, those being &#8230;<\/p>\n<ul>\n<li><font color=blue>You can change emojis if you know the \\002602 form of UTF-16 (hex) entry (our example is umbrella and if you express it as \\\\002602 that leaves cursor just as your emoji).  <\/font><\/li>\n<li><font color=purple>Double click existant foreground emoji element to clear all the foreground emoji elements.<\/font><\/li>\n<\/ul>\n<p>The choice of keyboard input methodology also suits CSS &#8220;content&#8221; property definitions as one backslash followed by a hexidecimal value left padded with zeroes to a length of six.  See us doing this below for an <span id=myumbrella>umbrella emoji <\/span> (which could also be expressed in an HTML hexadecimal entity way &amp;#x2602; &#x2602; the information for which you can find at <a target=_blank href='https:\/\/www.fileformat.info\/info\/unicode\/char\/2602\/index.htm'>Unicode Character &#8216;UMBRELLA&#8217; (U+2602)<\/a> we normally get to by entering &#8220;U+2602&#8221; at a web browser address bar, the knowledge for which we arrive at via entering &#8220;umbrella emojipedia&#8221; and moving down the top link&#8217;s webpage to find the &#8220;U+2602&#8221;)  &#8230;<\/p>\n<p><code><br \/>\n&lt;style&gt; #myumbrella::after { content: '\\002602'; } &lt;\/style&gt;<br \/>\n<\/code><\/p>\n<style> #myumbrella::after { content: '\\002602'; } <\/style>\n<p> &#8230; that feeds into some new <a target=_blank title='Event onkeydown information from W3schools' href='https:\/\/www.w3schools.com\/jsref\/event_onkeypress.asp'>&#8220;onkeypress&#8221;<\/a> keyboard event logic &#8230;<\/p>\n<p><code><br \/>\n  function kpcursorlook(evt) {<br \/>\n    var atofa=['a','b','c','d','e','f'];<br \/>\n    var rgbit='';<br \/>\n    if (evt.keyCode == 92) {<br \/>\n     if (newu.length == 1) { gro=true; } else { gro=false; }<br \/>\n     newu=(\"\\\\\").substring(0,1);<br \/>\n    } else if (evt.keyCode &gt;= 48 && evt.keyCode &lt;= 57) {<br \/>\n     newu+=('' + eval(-48 + evt.keyCode));<br \/>\n    } else if (evt.keyCode &gt;= 65 && evt.keyCode &lt;= 70) {<br \/>\n     newu+=('' + atofa[eval(-65 + evt.keyCode)]);<br \/>\n    } else if (evt.keyCode &gt;= 97 && evt.keyCode &lt;= 102) {<br \/>\n     newu+=('' + atofa[eval(-97 + evt.keyCode)]);<br \/>\n    }<br \/>\n    if (newu.length == 7) {<br \/>\n     if (lastcursor.indexOf((\"\\\\\\\\\").substring(0,2)) != -1) {<br \/>\n       rgbit=lastcursor.split((\"\\\\\\\\\").substring(0,2))[1].substring(6);<br \/>\n       lastcursor=lastcursor.split((\"\\\\\\\\\").substring(0,2))[0] + (\"\\\\\").substring(0,1) + newu + rgbit;<br \/>\n       document.head.innerHTML+='&lt;style&gt; html {  cursor: ' + lastcursor + '; } &lt;\/style&gt;';<br \/>\n     } else if (lastcursor.indexOf((\"\\\\\").substring(0,1)) != -1) {<br \/>\n       rgbit=lastcursor.split((\"\\\\\").substring(0,1))[1].substring(6);<br \/>\n       lastcursor=lastcursor.split((\"\\\\\").substring(0,1))[0] + newu + rgbit;<br \/>\n       if (gro) {<br \/>\n         lastcursor=lastcursor.replace('&gt;Shift\/Alt\/Ctrl', '&gt;').replace('&gt;Shift', '&gt;').replace('&gt;Alt', '&gt;').replace('&gt;Ctrl', '&gt;').replace(\" width='126'\", \" width='20'\").replace(\" width='66'\", \" width='20'\").replace(\" height='48'\", \" height='20'\").replace('0 0 100 100', '0 0 20 20');<br \/>\n       }<br \/>\n       document.head.innerHTML+='&lt;style&gt; html {  cursor: ' + lastcursor + '; } &lt;\/style&gt;';<br \/>\n     }<br \/>\n    }<br \/>\n   \/\/ console.log(evt.keyCode);<br \/>\n  }<br \/>\n<\/code><\/p>\n<p> &#8230; in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/body_mouse_deepdive.html-GETME\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/body_mouse_deepdive.html-GETME\">&#8220;proof of concept&#8221; body_mouse_deepdive.html<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/body_mouse_deepdive.html\" title=\"Click picture\">live run<\/a>.<\/p>\n<p><b><i>Stop Press<\/i><\/b><\/p>\n<p>Two more &#8220;title&#8221; attribute pieces of functionality are now &#8230;<\/p>\n<ul>\n<li><font color=darkgreen>With complex emoji entries do not zero leftpad until your last simple entity eg. \\\\1F6A3\\200D\\2640\\00FE0F could define a Woman Rowing complex emoji.<\/font><\/li>\n<li><font color=brown>Optionally make emojis bigger after \\ with + two time multipliers.<\/font><\/li>\n<\/ul>\n<p>The choice of keyboard input methodology also suits CSS &#8220;content&#8221; property definitions as one backslash followed by &#8220;first off&#8221; sets of HTML entities they should not left zero pad in their entry, followed by a last HTML entity hexidecimal value left padded with zeroes to a length of six to finish up with.  See us doing this below for a <span id=myrowing>woman rowing emoji <\/span> (which could also be expressed in an HTML hexadecimal entity way &amp;#x1f6a3;&amp;#x0200d;&amp;#x02640;&amp;#x0fe0f; the information for which you can find at <a target=_blank href='https:\/\/emojiterra.com\/woman-rowing-boat\/'>&#x1f6a3;&#x0200d;&#x02640;&#x0fe0f; Woman Rowing Boat Emoji<\/a> we normally get to by entering &#8220;woman rowing emoji&#8221; at the web browser address bar)  &#8230;<\/p>\n<p><code><br \/>\n&lt;style&gt; #myrowing::after { content: '\\01f6a3\\00200d\\002640\\00fe0f'; } &lt;\/style&gt;<br \/>\n<\/code><\/p>\n<style> #myrowing::after { content: '\\01f6a3\\00200d\\002640\\00fe0f'; } <\/style>\n<p> &#8230; in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/body_mouse_deepdive.html--GETME\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/body_mouse_deepdive.html--GETME\">&#8220;proof of concept&#8221; body_mouse_deepdive.html<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/body_mouse_deepdive.html\" title=\"Click picture\">live run<\/a>.<\/p>\n<p><img decoding=\"async\" style=\"width:100%;\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/body_mouse_deepdive_complexemoji.jpg\"><\/img><\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/keyboard-based-cursor-personalized-content-copy-tutorial\/'>Keyboard Based Cursor Personalized Content Copy Tutorial<\/a>.<\/p-->\n<hr>\n<p id='kbccct'>Previous relevant <a target=_blank title='Keyboard Based Cursor Content Copy Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/keyboard-based-cursor-content-copy-tutorial\/'>Keyboard Based Cursor Content Copy Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/body_mouse_deepdive.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Keyboard Based Cursor Content Copy Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/body_mouse_deepdive.jpg\" title=\"Keyboard Based Cursor Content Copy Tutorial\"  style=\"float:left;\"   \/><\/a><p class=\"wp-caption-text\">Keyboard Based Cursor Content Copy Tutorial<\/p><\/div>\n<p>The <a target=_blank title='Event onkeydown information from W3schools' href='https:\/\/www.w3schools.com\/jsref\/event_onkeydown.asp'>&#8220;onkeydown&#8221;<\/a> keyboard event can involve in its logic three <a target=_blank title='Mouse event information from W3schools' href='https:\/\/www.w3schools.com\/jsref\/obj_mouseevent.asp'>mouse event<\/a> (event object) property usages that caught our interest recently &#8230;<\/p>\n<ul>\n<li><a target=_blank title='event.altKey information from W3schools' href='https:\/\/www.w3schools.com\/jsref\/event_altkey.asp'>event.altKey<\/a><\/li>\n<li><a target=_blank title='event.shiftKey information from W3schools' href='https:\/\/www.w3schools.com\/jsref\/event_shiftkey.asp'>event.shiftKey<\/a><\/li>\n<li><a target=_blank title='event.ctrlKey information from W3schools' href='https:\/\/www.w3schools.com\/jsref\/event_ctrlkey.asp'>event.ctrlKey<\/a><\/li>\n<\/ul>\n<p> &#8230; and we wanted to have &#8220;keyboard&#8221; meets &#8220;mouse&#8221; events, along with the brilliance of <a target=_blank title='Lorem Picsum' href='https:\/\/picsum.photos\/'>Lorem Picsum<\/a> regarding background image randomosity and quality, working with HTML &#8230;<\/p>\n<p><code><br \/>\n&lt;div id=mydiv onfocus='setTimeout(alte, 1000);' onclick='stamp(this);' title='Click and type and see the cursor change as you use Alt or Shift or Control that can be reset via Caps Lock with a click copying cursor into content ... RJM Programming ... May, 2022 ... thanks to https:\/\/picsum.photos\/ Lorem Picsum' spellcheck='false' contenteditable=true style='width:100vw;height:100%;color:transparent;text-color:transparent;' data-onkeypress=xycursorlook(event); onkeydown=cursorlook(event); onmousemove=xycursorlook(event); ontouchmove=xycursorlook(event);&gt;&lt;\/div&gt;<br \/>\n<\/code><\/p>\n<p> &#8230; in a way we hadn&#8217;t tried before that called on some inhouse cursor SVG creations <font size=1>(and so is, alas, just a non-mobile fully featured experience)<\/font>, in the sense that &#8230;<\/p>\n<ol>\n<li>keyboard helps creating the &#8220;what&#8221; regarding content &#8230;<br \/>\n<code><br \/>\n&lt;script type='text\/javascript'&gt;<br \/>\n  var lastkeymodifier=''<br \/>\n  var lastcursor=\"Url(\\\"data:image\/svg+xml;utf8,&lt;svg xmlns='http:\/\/www.w3.org\/2000\/svg' width='126' height='48' viewport='0 0 100 100' style='border-radius:15px;background-color:rgba(0,255,0,0.3);fill:black;font-family:Verdana;font-size:16px;'&gt;&lt;text y='80%'&gt;Shift\/Alt\/Ctrl\\\\002753&lt;\/text&gt;&lt;\/svg&gt;\\\") 16 0, crosshair\";<br \/>\n  var pos3=-1, pos4=-1;<br \/>\n  var subdiv=1;<br \/>\n  var lastpos3=-2, lastpos4=-1;<br \/>\n  var allowable=false;<br \/>\n<br \/>\n  function cursorlook(evt) {<br \/>\n    if (evt.altKey) {<br \/>\n      if (lastkeymodifier != 'alt') {<br \/>\n        lastcursor=\"Url(\\\"data:image\/svg+xml;utf8,&lt;svg xmlns='http:\/\/www.w3.org\/2000\/svg' width='66' height='48' viewport='0 0 100 100' style='border-radius:15px;background-color:rgba(0,0,255,0.3);fill:black;font-family:Verdana;font-size:17px;'&gt;&lt;text y='80%'&gt;Alt\\\\01f3d5&lt;\/text&gt;&lt;\/svg&gt;\\\") 16 0, progress\";<br \/>\n        document.head.innerHTML+='&lt;style&gt; html {  cursor: ' + lastcursor + '; } &lt;\/style&gt;';<br \/>\n        lastkeymodifier='alt';<br \/>\n      }<br \/>\n    } else if (evt.ctrlKey) {<br \/>\n      if (lastkeymodifier != 'ctrl') {<br \/>\n        lastcursor=\"Url(\\\"data:image\/svg+xml;utf8,&lt;svg xmlns='http:\/\/www.w3.org\/2000\/svg' width='66' height='48' viewport='0 0 100 100' style='border-radius:15px;background-color:rgba(0,255,0,0.3);fill:black;font-family:Verdana;font-size:17px;'&gt;&lt;text y='80%'&gt;Ctrl\\\\01f333&lt;\/text&gt;&lt;\/svg&gt;\\\") 16 0, pointer\";<br \/>\n        document.head.innerHTML+='&lt;style&gt; html {  cursor: ' + lastcursor + '; } &lt;\/style&gt;';<br \/>\n        lastkeymodifier='ctrl';<br \/>\n      }<br \/>\n    } else if (evt.shiftKey) {<br \/>\n      if (lastkeymodifier != 'shift') {<br \/>\n        lastcursor=\"Url(\\\"data:image\/svg+xml;utf8,&lt;svg xmlns='http:\/\/www.w3.org\/2000\/svg' width='66' height='48' viewport='0 0 100 100' style='border-radius:15px;background-color:rgba(255,0,0,0.3);fill:black;font-family:Verdana;font-size:17px;'&gt;&lt;text y='80%'&gt;Shift\\\\01f389&lt;\/text&gt;&lt;\/svg&gt;\\\") 16 0, grab\";<br \/>\n        document.head.innerHTML+='&lt;style&gt; html {  cursor: ' + lastcursor + '; } &lt;\/style&gt;';<br \/>\n        lastkeymodifier='shift';<br \/>\n      }<br \/>\n    } else {<br \/>\n      if (lastkeymodifier != '') {<br \/>\n        lastcursor=\"Url(\\\"data:image\/svg+xml;utf8,&lt;svg xmlns='http:\/\/www.w3.org\/2000\/svg' width='126' height='48' viewport='0 0 100 100' style='border-radius:15px;background-color:rgba(0,255,0,0.3);fill:black;font-family:Verdana;font-size:16px;'&gt;&lt;text y='80%'&gt;Shift\/Alt\/Ctrl\\\\002753&lt;\/text&gt;&lt;\/svg&gt;\\\") 16 0, crosshair\";<br \/>\n        document.head.innerHTML+='&lt;style&gt; html {  cursor: ' + lastcursor + '; } &lt;\/style&gt;';<br \/>\n        lastkeymodifier='';<br \/>\n      }<br \/>\n    }<br \/>\n  }<br \/>\n&lt;\/script&gt;<br \/>\n<\/code>\n<\/li>\n<li>mouse <a target=_blank title='Event onmousedown information from W3schools' href='https:\/\/www.w3schools.com\/jsref\/event_onmousedown.asp'>&#8220;onmousemove&#8221;<\/a> or <a target=_blank title='Event ontouchdown information from W3schools' href='https:\/\/www.w3schools.com\/jsref\/event_touchmove.asp'>&#8220;ontouchmove&#8221;<\/a> helps with the &#8220;where&#8221; regarding content above &#8230;<br \/>\n<code><br \/>\n&lt;script type='text\/javascript'&gt;<br \/>\n  var pos3=-1, pos4=-1;<br \/>\n  var subdiv=1;<br \/>\n  var lastpos3=-2, lastpos4=-1;<br \/>\n  var allowable=false;<br \/>\n<br \/>\n  function xycursorlook(e) {<br \/>\n    e = e || window.event;<br \/>\n    e.preventDefault();<br \/>\n<br \/>\n       if (e.touches) {<br \/>\n       if (e.touches[0].pageX) {<br \/>\n       pos3 = e.touches[0].pageX;<br \/>\n       pos4 = e.touches[0].pageY;<br \/>\n       } else {<br \/>\n       pos3 = e.touches[0].clientX;<br \/>\n       pos4 = e.touches[0].clientY;<br \/>\n       }<br \/>\n       \/\/console.log('pos3=' + pos3 + ',pos4=' + pos4);<br \/>\n       } else if (e.clientX || e.clientY) {<br \/>\n        pos3 = e.clientX;<br \/>\n        pos4 = e.clientY;<br \/>\n       } else {<br \/>\n        pos3 = e.pageX;<br \/>\n        pos4 = e.pageY;<br \/>\n       }<br \/>\n  }<br \/>\n&lt;\/script&gt;<br \/>\n<\/code>\n<\/li>\n<li>preparations for &#8220;onclick&#8221; way a cursor can be plonked into (real lasting) content &#8230;<br \/>\n<code><br \/>\n&lt;script type='text\/javascript'&gt;<br \/>\n  var lastcursor=\"Url(\\\"data:image\/svg+xml;utf8,&lt;svg xmlns='http:\/\/www.w3.org\/2000\/svg' width='126' height='48' viewport='0 0 100 100' style='border-radius:15px;background-color:rgba(0,255,0,0.3);fill:black;font-family:Verdana;font-size:16px;'&gt;&lt;text y='80%'&gt;Shift\/Alt\/Ctrl\\\\002753&lt;\/text&gt;&lt;\/svg&gt;\\\") 16 0, crosshair\";<br \/>\n  var pos3=-1, pos4=-1;<br \/>\n  var subdiv=1;<br \/>\n  var lastpos3=-2, lastpos4=-1;<br \/>\n  var allowable=false;<br \/>\n  <br \/>\n  function stamp(divo) {<br \/>\n    if (('' + pos3).indexOf('-') == -1) {<br \/>\n    if (allowable) {<br \/>\n    \/\/if (allowed) {<br \/>\n    \/\/allowed=false;<br \/>\n    \/\/setTimeout(reseta, 2000);<br \/>\n    divo.innerHTML+='&lt;div id=div' + subdiv + ' style=\"position:absolute;top:' + pos4 + 'px;left:' + pos3 + 'px;width:126px;height:48px;background-color:transparent;\"&gt;&lt;\/div&gt;&lt;style&gt; #div' + subdiv + ' { background:' + lastcursor.split(') ')[0] + ') no-repeat; } &lt;\/style&gt;';<br \/>\n    subdiv++;<br \/>\n    \/\/console.log('lastpos4=' + lastpos4 + ' and pos4=' + pos4);<br \/>\n    \/\/console.log('lastpos3=' + lastpos3 + ' and pos3=' + pos3);<br \/>\n    lastpos3=pos3;<br \/>\n    lastpos4=pos4;<br \/>\n    \/\/}<br \/>\n    }<br \/>\n    }<br \/>\n  }<br \/>\n&lt;\/script&gt;<br \/>\n<\/code>\n<\/ol>\n<p> &#8230; with the <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/body_mouse_deepdive.html_GETME\">&#8220;proof of concept&#8221; body_mouse_deepdive.html<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/body_mouse_deepdive.html\" title=\"Click picture\">live run<\/a>.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d55848' onclick='var dv=document.getElementById(\"d55848\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/onkeydown\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d55848' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d55876' onclick='var dv=document.getElementById(\"d55876\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/onkeypress\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d55876' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d55891' onclick='var dv=document.getElementById(\"d55891\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/share\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d55891' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Yesterday&#8217;s Keyboard Based Cursor Personalized Content Copy Tutorial has probably reached a point where some sharing mechanism is apt, for accountability and usefulness purposes, at the very least, regarding our recent web application allowing for foreground content on top of &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/keyboard-based-cursor-share-content-copy-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,14,37],"tags":[2098,2432,155,2442,260,2127,342,380,2713,3727,576,2658,652,672,673,3982,739,812,861,1705,2337,2219,2723,894,907,997,2232,1776,1133,2587,1159,1200,1226,1319],"class_list":["post-55891","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-tutorials","tag-accountability","tag-alt","tag-body","tag-contenteditable","tag-control","tag-cursor","tag-div","tag-email","tag-emojiterra","tag-fileformat","tag-html","tag-html-entity","tag-javascript","tag-key","tag-keyboard","tag-lorem-picsum","tag-mailto","tag-mouse","tag-onclick","tag-onkeydown","tag-onkeypress","tag-onmousemove","tag-ontouchmove","tag-overlay","tag-paste","tag-programming","tag-property","tag-screenshot","tag-share","tag-shift","tag-sms","tag-stop-press","tag-svg","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/55891"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=55891"}],"version-history":[{"count":5,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/55891\/revisions"}],"predecessor-version":[{"id":55910,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/55891\/revisions\/55910"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=55891"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=55891"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=55891"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}