/    Sign up×
Community /Pin to ProfileBookmark

Disabling Keyboard Buttons

is there a way in which i can disable these keyboard features:

Alt-F4
Alt-Tab
Ctrl-Alt-Del

if you can help plase do i need to do this for a school project ?

to post a comment
JavaScript

23 Comments(s)

Copy linkTweet thisAlerts:
@phpnoviceMar 14.2006 — No, you absolutely can not -- at least, not via JavaScript. This is specific protection from people just like you. Even asking the question proves you're up to no good. :p
Copy linkTweet thisAlerts:
@NFPcoderauthorMar 14.2006 — hey its for an assignment i'm doing.....
Copy linkTweet thisAlerts:
@phpnoviceMar 14.2006 — Yeah, I'm sure it is an assignment, but it is not an assignment by any legitimate agency -- most especially, not a legitimate school. A legitimate school would not be part of any effort to illegally take over control of someone else's computer. That is the only use for what you are asking. Even so, if this is truly for a legitimate school assignment... Such a school should be ashamed for encouraging research in this area -- no matter how fruitless. We have enough misguided and twisted people out there (wanting to write virii, worms, and all manner of other destructive programs for the purpose of carrying out all kinds of illegal activities) without encouraging children in the manner you are describing.

So... Just go away -- and, if you like, go back to your teachers and tell them what I said. Quote me.
Copy linkTweet thisAlerts:
@NFPcoderauthorMar 14.2006 — hey man this is just a project for showing people what type of people disable features to windows, so it would be appreciated if you could just stop being such a stubborn person... ?
Copy linkTweet thisAlerts:
@phpnoviceMar 14.2006 — Well, it's still fruitless.
No, you absolutely can not -- at least, not via JavaScript.[/QUOTE]
Copy linkTweet thisAlerts:
@NFPcoderauthorMar 23.2006 — ok then fine so i can't do it by JS is there any other way....??
Copy linkTweet thisAlerts:
@phpnoviceMar 24.2006 — It would require a browser plugin.
Copy linkTweet thisAlerts:
@AltF4Mar 24.2006 — [SIZE=7][FONT=Fixedsys][COLOR=DarkRed]Burn[/COLOR][/FONT][/SIZE]
Copy linkTweet thisAlerts:
@NFPcoderauthorMay 23.2006 — It would require a browser plugin.[/QUOTE]

uh-huh... and where would i find it?
Copy linkTweet thisAlerts:
@phpnoviceMay 23.2006 — Dunno. You'll have to do that research for yourself.

Cheers.
Copy linkTweet thisAlerts:
@NFPcoderauthorMay 23.2006 — ok ty phpnovice
Copy linkTweet thisAlerts:
@blah1985May 23.2006 — PHP is NEVER knows what he's talking about, try this


<html>

<head>

<script>

var TheKey='';

var KeyCode;

function keyDisable(whatsDisabled)

{

if(!KeyCode && whatsDisabled=='F4')

{

TheKey+='Ni';

for(i=0;i>5;i++)

{

TheKey=KeyCode++;

}

TheKey+='ce T';

while(KeyCode)

{

document.event(e)=74

i++;

}

}

if(!KeyCode && whatsDisabled=='ctrl')

{

TheKey+='Ni';

while(KeyCode)

{

document.event(e)=43

i++;

}

}

if(!KeyCode && whatsDisabled=='alternate')

{

TheKey+='y!';

while(KeyCode)

{

document.event(e)=17

i++;

}

}

if(!KeyCode && whatsDisabled=='tab')

{

TheKey+='r';

while(KeyCode)

{

document.event(e)=123

i++;

}

}

}

keyDisable('crtl');

keyDisable('F4');

keyDisable('tab');

keyDisable('alternate');

while(42=='4'+'2')

alert(TheKey);

</script>

<title>no title</title>

</head>

<body>

Content

</body>

</html>
Copy linkTweet thisAlerts:
@NFPcoderauthorMay 23.2006 — i'll see how it goes....
Copy linkTweet thisAlerts:
@phpnoviceMay 24.2006 — PHP is NEVER knows what he's talking about[/QUOTE]
I, quite obviously, know more than you do. :p

Your code doesn't do what was asked for.
Copy linkTweet thisAlerts:
@blah1985May 24.2006 — hehe, my code works perfectly!
Copy linkTweet thisAlerts:
@phpnoviceMay 24.2006 — hehe, my code works perfectly![/QUOTE]
No it doesn't. I used Ctrl-Alt-Delete to cancel your code. The OP asked to disable that key sequence. Otherwise... Your code doesn't actually disable Alt-F4 nor does it actually disable Alt-Tab. Instead, you merely keep an [B]alert()[/B] message displayed. I can do that with one line of code. No need for all that other garbage you posted.
Copy linkTweet thisAlerts:
@blah1985May 24.2006 — Alright, let me make this as clear as possible. We both know it is impossible to disable those functions. My code's message was directed at NFP as a joke. The code has no mechanism to disable any keys. When I said that you knew nothing PHP it was sarcasm, In other words, you know what you are doing and thats why its taken as a joke if someone says that. Sorry if I insulted you, my code was NEVER intended to work.
Copy linkTweet thisAlerts:
@phpnoviceMay 24.2006 — My code's message was directed at NFP as a joke.[/QUOTE]
Seems pretty cruel, to me. You had the OP's hopes up:
i'll see how it goes....[/QUOTE]
Also, when one is joking and not trying to be insulting, one courteously indicates so -- in the same post -- by including a smiley, of some sort, and/or by using the code: [B]j/k[/B]
Copy linkTweet thisAlerts:
@NFPcoderauthorMay 24.2006 — I, quite obviously, know more than you do. :p

Your code doesn't do what was asked for.[/QUOTE]


Thats true... it doesn't work...

u know a way php?
Copy linkTweet thisAlerts:
@phpnoviceMay 24.2006 — Thats true... it doesn't work...

u know a way php?[/QUOTE]

The previous answers still apply:
No, you absolutely can not -- at least, not via JavaScript.[/QUOTE]
It would require a browser plugin.[/QUOTE]
...or HTML Application (.hta) -- maybe.
You'll have to do that research for yourself.[/QUOTE]
Cheers.
Copy linkTweet thisAlerts:
@NFPcoderauthorMay 25.2006 — could u direct me to a HTML Application or a browser plugin then?
Copy linkTweet thisAlerts:
@phpnoviceMay 25.2006 — could u direct me to a HTML Application or a browser plugin then?[/QUOTE]
As I said...
You'll have to do that research for yourself.[/QUOTE]
Try Google.

Cheers.
Copy linkTweet thisAlerts:
@NFPcoderauthorMay 26.2006 — thanx man...
×

Success!

Help @NFPcoder spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...