How to disable "function" (F1~F12) keys in 2.14?

Booting, installing, newbie
Post Reply
Message
Author
jeevitha
Posts: 16
Joined: Wed 07 Mar 2007, 10:28

How to disable "function" (F1~F12) keys in 2.14?

#1 Post by jeevitha »

when I build the puppy-2.14 in USB flash drive.I have selected xvesa(video wizard).How do I disable shortcut key (e.g Ctrl+Alt+F1 to F12) in puppy.

I tried
*******
In xorg.conf file, I have changed following things

Section "ServerFlags"
Option "DontVTSwitch" "yes"
End Section

and then I reboot the system.After that also All shortcut keys are working.

How do I disable all Shortcut key in puppy-2.14 .Any one help me.

User avatar
Ian
Official Dog Handler
Posts: 1234
Joined: Wed 04 May 2005, 12:00
Location: Queensland

#2 Post by Ian »

I know this is not an answer to your query but why do you wish to disable the shortcut key?

jeevitha
Posts: 16
Joined: Wed 07 Mar 2007, 10:28

shortcut key

#3 Post by jeevitha »

I would like to know about how to disable shortcut key in puppy-2.14.Any one help me.

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#4 Post by GuestToo »

Xvesa does not use the xorg.conf file

if you want to use options in the xorg.conf file, it is necessary to use the Xorg X server

you might be able to disable the virtual screens in /etc/inittab

jeevitha
Posts: 16
Joined: Wed 07 Mar 2007, 10:28

shortcut key

#5 Post by jeevitha »

how do i disable virtual screen in /etc/inittab puppy-2.14.plz any one help me.

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#6 Post by GuestToo »

i am not sure configuring inittab will do what you want it to do

it would be better to use Xorg than Xvesa, but if you need to use Xvesa, you could disable vt switching in Xvesa like this:

put this in the hidden file /root/.Xmodmap (create the file if it does not exist):

keycode 67 = F1
keycode 68 = F2
keycode 69 = F3
keycode 70 = F4
keycode 71 = F5
keycode 72 = F6
keycode 73 = F7
keycode 74 = F8
keycode 75 = F9
keycode 76 = F10
keycode 95 = F11
keycode 96 = F12

restart X

this should disable vt switching while you are running X

it will still be possible to vt switch from text mode, if X is killed

jeevitha
Posts: 16
Joined: Wed 07 Mar 2007, 10:28

disable VT

#7 Post by jeevitha »

GuestToo wrote:
********************
I am not sure configuring inittab will do what you want it to do

it would be better to use Xorg than Xvesa, but if you need to use Xvesa, you could disable vt switching in Xvesa like this:

put this in the hidden file /root/.Xmodmap (create the file if it does not exist):

keycode 67 = F1
keycode 68 = F2
keycode 69 = F3
keycode 70 = F4
keycode 71 = F5
keycode 72 = F6
keycode 73 = F7
keycode 74 = F8
keycode 75 = F9
keycode 76 = F10
keycode 95 = F11
keycode 96 = F12

restart X

this should disable vt switching while you are running X
*************

when I build the puppy in USB drive.I have selected xvesa(as video Wizard)

/root/.Xmodmap
******************

keycode 67 = F1
keycode 68 = F2
keycode 69 = F3
keycode 70 = F4
keycode 71 = F5
keycode 72 = F6
keycode 73 = F7
keycode 74 = F8
keycode 75 = F9
keycode 76 = F10
keycode 95 = F11
keycode 96 = F12

restart X

In root,.Xmodmap file doesn't exit so I add that file to /root as hidden file.And then I reboot the system.There is no changes.How do I disable VT switching (when press Ctrl+Alt+F1 to F2).Please any one help me.

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#8 Post by GuestToo »

what keyboard are you using?

type:

xmodmap -pke | grep ' F'

does it look like this? (it should not):

keycode 67 = F1 XF86_Switch_VT_1
keycode 68 = F2 XF86_Switch_VT_2
keycode 69 = F3 XF86_Switch_VT_3
etc etc etc

it should look like this, after creating .Xmodmap:

keycode 67 = F1
keycode 68 = F2
keycode 69 = F3
etc etc etc

maybe the keycodes for the Fn keys of your keyboard are different?

janani
Posts: 2
Joined: Wed 14 Mar 2007, 11:07

disable events of keys in puppy2.14

#9 Post by janani »

GuestToo wrote:
*************

what keyboard are you using?

type:

xmodmap -pke | grep ' F'

does it look like this? (it should not):

keycode 67 = F1 XF86_Switch_VT_1
keycode 68 = F2 XF86_Switch_VT_2
keycode 69 = F3 XF86_Switch_VT_3
etc etc etc

it should look like this, after creating .Xmodmap:

keycode 67 = F1
keycode 68 = F2
keycode 69 = F3
etc etc etc

maybe the keycodes for the Fn keys of your keyboard are different?

I tried but failed:
*************

My keyboard type is ps/2

i tried this command ,

xmodmap -pke | grep ' F'

It gives:
******

keycode 67 = F1
keycode 68 = F2
keycode 69 = F3
...
...

but keys are not disabled.

what is a problem?

how to solve this?

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#10 Post by GuestToo »

what is a problem?
it seems to work using Xorg ... so probably it is not working with Xvesa because Xvesa does not work well with xkb ... probably the response to ctrl+alt+Fn is hard coded in the Xvesa binary ... Xvesa is very limited, Xorg is much better ... Xorg will do exactly what you want

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#11 Post by GuestToo »

you could set up /etc/inittab to have only 1 terminal, like this:

::sysinit:/etc/rc.d/rc.sysinit
tty1::respawn:/sbin/getty -n -l /bin/autologinroot 38400 tty1
::ctrlaltdel:/sbin/reboot

you can still switch to the other terminals, but they will just be blank screens, you can not login to the terminal

you can still switch to tty1, of course

you could run a script like this:

#!/bin/sh
while :
do
sleep 1
echo $DISPLAY | grep -q ':0.0' || chvt 2
done

start it from a command in /root.xinitrc, before the exec $CURRENTWM commands, like this:

/etc/rc.d/vt2 &

what this will do, is if you switch to tty1, it will switch itself back to tty2 (the Xvesa X display)

maybe there is a less crude way of doing it ... the problem is that Xvesa is very limited, i think the vt switch might be hard coded in the binary

Browny
Posts: 59
Joined: Tue 13 Feb 2007, 03:41

Disabling the F1-F12 keys in Puppy

#12 Post by Browny »

GuestToo,

I have tried the options said above but it not working correctly.....

By editing the /root/.xinitrc file with the lines given by you, Ct+Alt+F2 key is not working but ctrl+atl+f1 key shows the blank screen.

After REBOOT, i didn't get any task bar and the upper bar for all file browser

Kindly try to help me on getting this work

Thank you

Browny

jeevitha
Posts: 16
Joined: Wed 07 Mar 2007, 10:28

disable shortcut key

#13 Post by jeevitha »

GuestToo,

In puppy2.14,How to make puppy only with Graphical mode.Not go to text mode.I am using xvesa (video wizard).Please help me.

Thanks,

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#14 Post by GuestToo »

i think using Xorg, it is very easy ... just put this in xorg.conf:

Option "DontVTSwitch"
Option "DontZap" "true"

using Xvesa, maybe you would need to hack the source, disable VT switching and ctrl+alt+backspace and maybe ctrl+alt+del, and recompile Xvesa

if Xvesa has problems returning to the X screen from a virtual terminal, maybe you could just reboot Puppy instead?

in the daemon script, you could change chvt to wmreboot, like this:

#!/bin/sh
while :
do
sleep 1
echo $DISPLAY | grep -q ':0.0' || wmreboot
done

or does the script work with Xvesa? ... all of my suggestions do work using Xorg

i suspect that you want to use Puppy as a kiosk, and for some reason you also want to use Xvesa ... Xvesa is very limited and is not really a good choice

jeevitha
Posts: 16
Joined: Wed 07 Mar 2007, 10:28

Xvesa

#15 Post by jeevitha »

GuestToo,

In puppy2.14,Xvesa present in binary format.How to get the source code of
Xvesa(video wizard).Please give the informaion to get xvesa source code.After getting the source code of xvesa how to compile this source code.

Thanks,

Post Reply