473,396 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Disable Key Board in Powerpoint slide

49
Hi,
Can any one tell me How to disable Keyboard Functions using JavaScript.If knows please tell me the code.Also tell me the code for mouse disable also.

Thanks,
Nagesh.
Sep 10 '08 #1
16 6623
RamananKalirajan
608 512MB
Can i know for what reason u are disabling the keyboard. for a particular field u can do that by the following method

[HTML]function doThis()
{
return false;
}[/HTML]

[HTML]<input type="text" onkeypress="return doThis();">[/HTML]

for this particular text box u cant enter anything. the key board behaves as blocked one. Is this ur requirement. you just post with some additional information about ur requirement

Regards
Ramanan Kalirajan
Sep 10 '08 #2
nagmvs
49
Can i know for what reason u are disabling the keyboard. for a particular field u can do that by the following method

[HTML]function doThis()
{
return false;
}[/HTML]

[HTML]<input type="text" onkeypress="return doThis();">[/HTML]

for this particular text box u cant enter anything. the key board behaves as blocked one. Is this ur requirement. you just post with some additional information about ur requirement

Regards
Ramanan Kalirajan

Hello Sir,

Thanks for ur reply.Actually my y requirement is to disable keyboard keys in a particular web page what i am having.on that webpage i don't allow anyone to copy and paste and also printing.for using some code i disable it.

But now other requirement is to disable keyboard on powerpoint presentaion that means when a slide is playing i want to disable keyboard keys like pagedown, page up,arrow keys,Enter key,Backspace.Home,End and also escape keys.
If possible tell me what is the code for this ?.I am already disable right mouse click and left clicks using some code.

So now i want to disable the above keys.If u know the Javascript code or HTML code means please tell me the code.
It's Urgent.

Thanks,
Nagesh.
Sep 11 '08 #3
I once used this in the body to disable right-click (obviously this will need updating to the new format):

Expand|Select|Wrap|Line Numbers
  1. <script language=JavaScript>
  2. <!--
  3.  
  4. var message="Function Disabled!";
  5.  
  6. function clickIE() {if (document.all) {alert(message);return false;}}
  7. function clickNS(e) {if 
  8. (document.layers||(document.getElementById&&!document.all)) {
  9. if (e.which==2||e.which==3) {alert(message);return false;}}}
  10. if (document.layers) 
  11. {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
  12. else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
  13.  
  14. document.oncontextmenu=new Function("return false")
  15. // --> 
  16. </script>
  17.  
and this to disable select with left click, in the head:
Expand|Select|Wrap|Line Numbers
  1. <script language="JavaScript1.2">
  2.  
  3. function disableselect(e){
  4. return false
  5. }
  6.  
  7. function reEnable(){
  8. return true
  9. }
  10.  
  11. //if IE4+
  12. document.onselectstart=new Function ("return false")
  13.  
  14. //if NS6
  15. if (window.sidebar){
  16. document.onmousedown=disableselect
  17. document.onclick=reEnable
  18. }
  19. </script>\
  20.  
I hope this helps.
Sep 11 '08 #4
acoder
16,027 Expert Mod 8TB
But now other requirement is to disable keyboard on powerpoint presentaion that means when a slide is playing i want to disable keyboard keys like pagedown, page up,arrow keys,Enter key,Backspace.Home,End and also escape keys.
Get the key/char codes of the keys pressed - this link should help. If they match, cancel them with a return false.
Sep 11 '08 #5
acoder
16,027 Expert Mod 8TB
I once used this in the body to disable right-click (obviously this will need updating to the new format):
The code is pretty outdated. You could get rid of most of that code and it should work fine in most browsers.

Note that all this mouse/key disabling is easy to circumvent. Don't depend on it.
Sep 11 '08 #6
Markus
6,050 Expert 4TB
Whatever you do, the user will always be able to view the source of a page and, therefore, copy the content.
Sep 11 '08 #7
nagmvs
49
I once used this in the body to disable right-click (obviously this will need updating to the new format):

Expand|Select|Wrap|Line Numbers
  1. <script language=JavaScript>
  2. <!--
  3.  
  4. var message="Function Disabled!";
  5.  
  6. function clickIE() {if (document.all) {alert(message);return false;}}
  7. function clickNS(e) {if 
  8. (document.layers||(document.getElementById&&!document.all)) {
  9. if (e.which==2||e.which==3) {alert(message);return false;}}}
  10. if (document.layers) 
  11. {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
  12. else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
  13.  
  14. document.oncontextmenu=new Function("return false")
  15. // --> 
  16. </script>
  17.  
and this to disable select with left click, in the head:
Expand|Select|Wrap|Line Numbers
  1. <script language="JavaScript1.2">
  2.  
  3. function disableselect(e){
  4. return false
  5. }
  6.  
  7. function reEnable(){
  8. return true
  9. }
  10.  
  11. //if IE4+
  12. document.onselectstart=new Function ("return false")
  13.  
  14. //if NS6
  15. if (window.sidebar){
  16. document.onmousedown=disableselect
  17. document.onclick=reEnable
  18. }
  19. </script>\
  20.  
I hope this helps.

Hello sir,

Thanks for sending this code.Sir already i disable left mouse and right mouse.now i want the code to disable Pageup,pagedown,Arrow keys and also Backspace,Enter keys in a powerpoint presentation(Actually i ahve a power point presentation that is converted as html page).when a slide is running i want to disable all these keys.If u know the code means please send me.

I have some code to disable key board

Expand|Select|Wrap|Line Numbers
  1. <!-- This code is for disableing some keyboard keys-->
  2.  
  3. <SCRIPT language="Javascript">
  4. var keyesMessage="Questa funzione non si puņ usare!";
  5. function nokeys(){
  6. if (document.all)
  7. {
  8. //alert(keyesMessage);
  9. return false;
  10. }
  11. }
  12. if (document.all)
  13. {
  14. document.onkeydown=nokeys;
  15. }
  16. </SCRIPT>
  17.  
This code is running successfully in a web page.But not running on a power point slide.

so if u know the code to disable all keyboard keys( in any type of web page)
please send me the code.

it's urgent.

Thanks,
Nagesh.
Sep 12 '08 #8
nagmvs
49
Hello Guys,

I wan
t the code to disable keyboard in a power point slide.already i disable left mouse and right mouse.now i want the code to disable Pageup,pagedown,Arrow keys and also Backspace,Enter keys in a powerpoint presentation(Actually i have a power point presentation that is converted as html page).when a slide is running i want to disable all these keys.If u know the code means please send me.



I have some code to disable key board :

Expand|Select|Wrap|Line Numbers
  1. <!-- This code is for disableing some keyboard keys-->
  2.  
  3. <SCRIPT language="Javascript">
  4. var keyesMessage="Questa funzione non si puņ usare!";
  5. function nokeys(){
  6. if (document.all)
  7. {
  8. //alert(keyesMessage);
  9. return false;
  10. }
  11. }
  12. if (document.all)
  13. {
  14. document.onkeydown=nokeys;
  15. }
  16. </SCRIPT>
  17.  
This code is running successfully in a web page.But not running on a power point slide.

so if any one know the code to disable all keyboard keys( in any type of web page)
please send me the code.

thanks in advance,
Nagesh.
it's urgent.
Sep 12 '08 #9
acoder
16,027 Expert Mod 8TB
What exactly are you trying to achieve by blocking these keys and mouse events? If you're trying to protect the content, then forget it. It's not worth the effort and will easily be bypassed by someone willing enough.
Sep 12 '08 #10
acoder
16,027 Expert Mod 8TB
Merged threads. Please do not double post your questions.

Also remember to use code tags when posting code. See How to ask a question.

Moderator.
Sep 12 '08 #11
nagmvs
49
What exactly are you trying to achieve by blocking these keys and mouse events? If you're trying to protect the content, then forget it. It's not worth the effort and will easily be bypassed by someone willing enough.

Hello sir,

Thanks for ur advice. If i am not getting the exact result means what i do.so i send questions again.ok if u know the answer means answer it.why ur asking me like this sir.

Ok
u must respect the customers.ok then only ur site is big hit.if ur doing same things means -----------------------? see sir here all r posting questions ok

ok.
Sep 12 '08 #12
nagmvs
49
Merged threads. Please do not double post your questions.

Also remember to use code tags when posting code. See How to ask a question.

Moderator.
Hello sir,

i know the site rules and every thing,ok no need to tell me again.

suppose if we want to buy one product means we know all the advantages of that product then only we buy it.ok
so when i want to join this site first day i read all ur rules.ok
so no need to post ur rules for me .ok

bye.
Sep 12 '08 #13
acoder
16,027 Expert Mod 8TB
If you're not going to abide by the rules, then the rules will be pointed out to you. It's not enough to read the rules, you also have to follow them.
Sep 12 '08 #14
acoder
16,027 Expert Mod 8TB
Thanks for ur advice. If i am not getting the exact result means what i do.so i send questions again.ok if u know the answer means answer it.why ur asking me like this sir.

Ok
u must respect the customers.ok then only ur site is big hit.if ur doing same things means -----------------------?
Firstly, you're not my customer. I don't own this site and you're getting free help. Now I don't know if you took the wrong meaning from my post, but that was unintended. I was asking a genuine question and letting you know that your effort on this 'problem' might be wasted and put to better use elsewhere.

Let's say you got a fabulous script that does all the blocking. I can disable JavaScript and get all the content anyway. If not, I could view the source to see the content. All this mouse/key disabling/blocking will do is annoy your users.

Do you see where I'm coming from?
Sep 12 '08 #15
nagmvs
49
Firstly, you're not my customer. I don't own this site and you're getting free help. Now I don't know if you took the wrong meaning from my post, but that was unintended. I was asking a genuine question and letting you know that your effort on this 'problem' might be wasted and put to better use elsewhere.

Let's say you got a fabulous script that does all the blocking. I can disable JavaScript and get all the content anyway. If not, I could view the source to see the content. All this mouse/key disabling/blocking will do is annoy your users.

Do you see where I'm coming from?

Ok sir Thanks,Now onwards i will follow ur rules.And depending on my rquirement i must disable the keyboard.So for that reason only i post here.Sir already i am disable the right click so no one can see my source.and also i am disable toolbars,static bars and every thing.so there is no way to see my source.

leave all thse things sir.Sorry for that.ok

Regards,
Nagesh.
Sep 13 '08 #16
acoder
16,027 Expert Mod 8TB
Even if you make all these efforts to stop someone getting at the source, they could just disable JavaScript. In fact, I suggest you try it. Go into your browser options and disable JavaScript and try loading the page again.

If you're still insistent, see post #5 to see how you could disable certain keys.
Sep 13 '08 #17

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: careta | last post by:
Hello, I'm trying to automate PP creation from VB.net. The initial code is (as extracted from MSDN's KB209960): Public Sub Command1_Click() ' Start PowerPoint. Dim ppApp As...
0
by: Ata | last post by:
Hello, I am trying to copy the contents of the output of SQL Reporting Services to a PowerPoint slide. For this, I am using SQL Reporting Services to obtain an IMAGE stream, which I paste to the...
2
by: WillRead | last post by:
I have a VB.Net application and a PowerPoint presentation explaining how each form in the application works, etc.. I would like to select and display the slide appropriate for each form by pressing...
8
by: Rut | last post by:
Does anyone know how to start powerpoint from vb.net without the ppt screen appearing. I want to keep it hidden? Using this code: Try pp = New PowerPoint.Application pp.Visible =...
0
by: milkyman | last post by:
Hi there, I hope you can help me. I did download some code, from the Microsoft knolidgebase(MSDN), and it's great. I just don't know how to change the code so that it uses a template, thats on my...
1
by: EmmettBrown | last post by:
Hello, Just wondering if anyone can advise. I am trying to remotely control Powerpoint using a microprocessor. I am using RS232 (COM1). The idea is that the microprocessor sends ASCII strings...
1
by: mumbaisalsa | last post by:
hi all, i want to run the slide show say ten slides and then close it , but in my code given below it opens the slide show and closes immediately ... .. please give me a solution to this...
3
by: WPeterson | last post by:
Converting PowerPoint to Flash would absolutely be a good choice to distribute your bulky PowerPoint presentations. You can do the whole PowerPoint to Flash conversion manually or with...
1
by: chrizstone | last post by:
Hi Guys, What i want to do is: I want to create a Slide programmatically where a Table is on it! Here“s my Code: String strTemplate; strTemplate = template; String...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.