On 25 Jul 2008, at 06:19, Roger Pack wrote:
> Sujith Gangaraju wrote:
>> I am showing document in browser
>> i want to disable the copy option ctrl + c key in ruby
>> please help me out
>
> Might work to do it the traditional Ruby way:
>
> http://betterlogic.com/roger/?p=110
>
> windows:
> trap :INT, proc { a got your ctrl-c!}
>
> and linux
>
> trap °…SIGUSR1°Ū, proc {°«got it in linux, too°«}
>
> I think.  Maybe add to environment.rb?

That would stop the Rails application from processing a ctrl-c on the  erver keyboard (if it has one) but would make no difference in the  
browser as the Ruby code doesn't run there.


Ellie

Eleanor McHugh
Games With Brains
http://slides.games-with-brains.net
----
raise ArgumentError unless @reality.responds_to? :reason